Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the dependabot workflow by removing the legacy post-update jobs and integrating the devcontainer hash update into the CI workflow. Key changes include the removal of the dependabot-post-update workflows, the introduction of a composite action for updating the devcontainer hash, and modifications to the CI workflow to incorporate a new job that invokes this composite action.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| template/.github/workflows/dependabot-post-update.yaml | Removed legacy dependabot post‐update workflow |
| template/.github/actions/update-devcontainer-hash/action.yml | Added composite action for updating the devcontainer hash (template version) |
| .github/workflows/dependabot-post-update.yaml | Removed legacy dependabot post‐update workflow |
| .github/workflows/ci.yaml | Updated CI workflow to include a new job invoking the composite action |
| .github/actions/update-devcontainer-hash/action.yml | Added composite action for updating the devcontainer hash (main repo version) |
| .copier-answers.yml | Updated commit hash reference for Copier template |
| name: Update Devcontainer Hash | ||
|
|
||
| inputs: | ||
| branch: | ||
| description: 'Branch to checkout and update' | ||
| required: true | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Verify Dependabot actor | ||
| if: ${{ github.actor != 'dependabot[bot]' }} | ||
| run: | | ||
| echo "Action can only be run by dependabot[bot], but was invoked by ${GITHUB_ACTOR}." >&2 | ||
| exit 1 | ||
|
|
||
| - name: Checkout code | ||
| uses: actions/checkout@v4.2.2 | ||
| with: | ||
| persist-credentials: true | ||
| fetch-depth: 1 | ||
| ref: ${{ inputs.branch }} | ||
|
|
||
| - 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 --exit-zero | ||
|
|
||
| - name: Commit & push changes | ||
| run: | | ||
| if ! git diff --quiet; then | ||
| git add . | ||
| git commit -m "chore: update devcontainer hash [dependabot skip]" | ||
| git push origin HEAD:${{ inputs.branch }} | ||
| else | ||
| echo "No changes to commit" | ||
| fi |
There was a problem hiding this comment.
A composite action 'Update Devcontainer Hash' is defined in both 'template/.github/actions/update-devcontainer-hash/action.yml' and '.github/actions/update-devcontainer-hash/action.yml'. Consider consolidating these into a single source to reduce duplication and ease maintenance.
| name: Update Devcontainer Hash | |
| inputs: | |
| branch: | |
| description: 'Branch to checkout and update' | |
| required: true | |
| permissions: | |
| contents: write | |
| runs: | |
| using: composite | |
| steps: | |
| - name: Verify Dependabot actor | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| run: | | |
| echo "Action can only be run by dependabot[bot], but was invoked by ${GITHUB_ACTOR}." >&2 | |
| exit 1 | |
| - name: Checkout code | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| persist-credentials: true | |
| fetch-depth: 1 | |
| ref: ${{ inputs.branch }} | |
| - 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 --exit-zero | |
| - name: Commit & push changes | |
| run: | | |
| if ! git diff --quiet; then | |
| git add . | |
| git commit -m "chore: update devcontainer hash [dependabot skip]" | |
| git push origin HEAD:${{ inputs.branch }} | |
| else | |
| echo "No changes to commit" | |
| fi | |
| # File removed to consolidate the composite action into a single source. |
Trying again