Skip to content

Sync Submodules

Sync Submodules #40

name: Sync Submodules
on:
schedule:
- cron: "0 * * * *"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: sync-submodules
cancel-in-progress: true
jobs:
sync:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Pull latest submodule commits
run: git submodule update --remote --merge
- name: Commit and push
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add -A
if git diff --staged --quiet; then
echo "No changes to commit"
else
git commit -m "sync: update submodules ($(date -u '+%Y-%m-%d %H:%M UTC'))"
git push
fi