submodule-updated #19
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 when notified | |
| on: | |
| repository_dispatch: | |
| types: [submodule-updated] | |
| workflow_dispatch: | |
| jobs: | |
| run-update-script: | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout parent repo | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| submodules: recursive | |
| token: ${{ secrets.GH_PAT }} | |
| - name: Configure git user | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| shell: pwsh | |
| - name: Run UpdateRepos.ps1 with auto-commit | |
| run: | | |
| ./UpdateRepos.ps1 -Commit -Message "chore: update submodules to latest" | |
| shell: pwsh | |
| - name: Push changes | |
| run: | | |
| echo "Changes detected. Pushing..." | |
| git push origin HEAD:main | |
| shell: pwsh |