Skip to content

Copier update (action for dependabot)#29

Merged
ejfine merged 4 commits intomainfrom
trigger3
May 9, 2025
Merged

Copier update (action for dependabot)#29
ejfine merged 4 commits intomainfrom
trigger3

Conversation

@ejfine
Copy link
Contributor

@ejfine ejfine commented May 9, 2025

Trying again

@ejfine ejfine requested a review from Copilot May 9, 2025 14:33
@ejfine ejfine self-assigned this May 9, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment on lines +1 to +45
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
Copy link

Copilot AI May 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
@ejfine ejfine merged commit 0240856 into main May 9, 2025
8 checks passed
@ejfine ejfine deleted the trigger3 branch May 9, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants