update_submodules #67
This file contains 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: | |
push: | |
branches: [ main ] | |
repository_dispatch: | |
types: [ update_submodules ] | |
workflow_dispatch: | |
jobs: | |
update_submodules: | |
name: Update Submodules | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
submodules: true | |
- name: Update Submodules | |
run: | | |
git submodule update --init --recursive | |
git submodule update --recursive --remote | |
- name: Commit and Push changes | |
run: | | |
git config --global user.email "actions@github.com" | |
git config --global user.name "GitHub Actions - Update Submodules" | |
git pull origin main | |
git add --all | |
git commit -m "Update submodules" || echo "No changes to commit" | |
git push |