feat(workflows): add devcontainer infrastructure change log workflow#899
Conversation
- Replace `HEAD~1 HEAD` / `fetch-depth: 2` with `BEFORE_SHA..GIT_SHA` and `fetch-depth: 0` so all commits in a push are included in the diff - Add `workflow_dispatch` informational message (no diff available) - Add zero-SHA guard for initial branch pushes - Add `set -euo pipefail` for reinforced shell scripting - Remove redundant file-level comment block - Remove `if: always()` from summary step
…diff - replace silent 2>/dev/null || true with explicit if ! guard - emit unreachable-SHA message when git diff exits non-zero
|
@AhmedMustafa249 — thanks so much for picking this up!! Just a couple of small things before we can merge: 1. Documentation update needed I have just updated the related issue #517 to reflect an omission we had: docs updates. Just realized this now...
Something like: | 2. Two linting checks worth running and ticking off The checklist is missing a couple of validations that the
Both should be quick passes given the file looks correct, but worth confirming and adding to the checklist so reviewers can see they were verified. Once those are in, this should be good to go! |
|
@katriendg Added the workflow inventory item to the workflow documentation, the two extra test for YAML linting and SHA version consistency already passed before but I overlook adding them to the automated checks list -- Everything should be all good! |
85a4b16 to
040f0f8
Compare
|
Thanks @AhmedMustafa249! I also realize the issue had an optional item in original issue Optionally notify via issue comment when changes affect prebuild-critical files. @WilliamBerryiii > what is your view on adding this? It will require adding Issues or PR |
- add Dockerfile/dockerfile pattern for Base Image category - add features/* pattern for Features category 🔧 - Generated by Copilot
|
Thanks for this contribution, @AhmedMustafa249! Great work putting together the devcontainer change log workflow. 🎉 I pushed a small addition to your branch — two new case patterns so the workflow also categorizes base image and features changes, which were called out in the acceptance criteria on #517: .devcontainer/Dockerfile*|.devcontainer/*.dockerfile)
echo "| \`$file\` | Base Image | High |"
;;
.devcontainer/features/*)
echo "| \`$file\` | Features | Medium |"
;;This ensures all four categories (base image, features, lifecycle scripts, setup steps) have explicit patterns before the catch-all. |
I'm ok skipping this. The issue was primarily set up for alerting me on when the codespace needed to be rebuilt ... but I automated all of that, so no need for the automated issue publishing. |
Pull Request
Description
Adds devcontainer-change-log.yml, an informational GitHub Actions workflow that triggers on push to main or develop when devcontainer infrastructure files change. It outputs a structured markdown table to $GITHUB_STEP_SUMMARY categorizing each changed file by tier and pre-build impact.
Key behaviors:
Related Issue(s)
Closes #517
Type of Change
Code & Documentation:
Infrastructure & Configuration:
Other:
.ps1,.sh,.py)Testing
Verified end-to-end on a fork where main has no branch protection:
The workflow file, category logic, and error-handling paths all behaved as designed.
Checklist
Required Checks
Required Automated Checks
The following validation commands must pass before merging:
npm run lint:mdnpm run spell-checknpm run lint:frontmatternpm run validate:skillsnpm run lint:md-linksnpm run lint:psnpm run plugin:generatenpm run lint:yamlnpm run lint:version-consistencySecurity Considerations
The workflow uses permissions: contents: read at both workflow and job level. persist-credentials: false is set on the checkout step. No secrets or PATs are used. The single external action (actions/checkout) is pinned to a full commit SHA with a version comment.
Additional Notes
The workflow is purely informational, it writes only to $GITHUB_STEP_SUMMARY and has no write permissions against the repository. It is safe to ignore if the run is skipped or cancelled.