Update Submodules #57
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: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| jobs: | |
| update-wpt: | |
| name: Update Submodules | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - name: Checkout Repository | |
| id: checkout | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| persist-credentials: true | |
| - name: Git Config | |
| id: git-config | |
| run: | | |
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config --global user.name "github-actions[bot]" | |
| - name: Update Submodules | |
| id: update-submodules | |
| run: | | |
| git submodule update --init --recursive | |
| - name: Check for Changes | |
| id: check-for-changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "change=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "change=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Create Branch | |
| id: create-branch | |
| if: steps.check-for-changes.outputs.change == 'true' | |
| run: | | |
| git checkout -b submodules-update | |
| git add . | |
| git commit -m "chore: update Submodules" | |
| - name: Create Pull Request | |
| id: create-pr | |
| if: steps.check-for-changes.outputs.change == 'true' | |
| uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8 | |
| with: | |
| base: main | |
| branch: submodules-update | |
| title: Update Submodules | |
| body: Automated update of the Submodules | |
| commit-message: "chore: update Submodules" |