Skip to content

Update Submodules

Update Submodules #65

name: Update Submodules
on:
schedule:
- cron: '0 6,12,18 * * *'
workflow_dispatch:
repository_dispatch:
types: [submodule-update]
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.PAT }}
ref: main
- name: Update submodule pointers
run: git submodule update --remote
- name: Commit and push if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git diff --quiet && git diff --staged --quiet || (
git add . &&
git commit -m "Update submodule pointers" &&
git pull --rebase &&
git push
)