Copier update (dependabot job) #1
Workflow file for this run
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: Dependabot Post-Update | |
| permissions: | |
| contents: write # grant write access so we can push commits | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: | |
| - main | |
| jobs: | |
| post-update: | |
| if: ${{ github.actor == 'dependabot[bot]' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| persist-credentials: true # (default) makes GITHUB_TOKEN available for git push | |
| - name: Configure Git author | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| - name: Update devcontainer hash | |
| run: python3 .github/workflows/hash_git_files.py . --for-devcontainer-config-update | |
| - name: Commit & push changes | |
| run: | | |
| # only commit if there are changes | |
| if ! git diff --quiet; then | |
| git add . | |
| git commit -m "chore: apply post-Dependabot script changes" | |
| git push | |
| else | |
| echo "No changes to commit" | |
| fi |