Update Submodules #1
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: | |
workflow_dispatch: | |
jobs: | |
update-submodules: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.PAT }} | |
submodules: true | |
- name: Update all submodules to latest commit | |
run: | | |
git submodule update --init --recursive | |
git submodule update --remote --merge | |
- name: Commit and push changes | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
if git diff --cached --quiet; then | |
echo "No changes to commit" | |
else | |
git commit -m "Update submodules to latest commit" | |
git push origin HEAD | |
fi |