Update Submodules #65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| ) |