Update Submodules #178
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| 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 --remote --merge | |
| - name: Check for Changes | |
| id: check-for-changes | |
| run: | | |
| if git diff --quiet; then | |
| echo "no changes detected" | |
| echo "change=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changes detected" | |
| 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" | |
| git push --force --set-upstream origin submodules-update | |
| - name: Create Pull Request | |
| id: create-pr | |
| if: ${{ steps.check-for-changes.outputs.change == 'true'}} | |
| uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0 | |
| with: | |
| base: main | |
| branch: submodules-update | |
| title: Update Submodules | |
| body: Automated update of the Submodules | |
| commit-message: "chore: update Submodules" |