Skip unchanged images on PR builds#44
Open
mrdavidlaing wants to merge 2 commits into
Open
Conversation
The load-matrix job now filters the build matrix by comparing PR changed files against each image's declared source paths. Single-image PRs only build the affected image; flake/common/workflow changes still trigger a full rebuild of all images. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SBOM Quality Gate
|
c8c13c2 to
81aceb2
Compare
Move the inline changed-file detection and matrix filtering logic from build.yml into common/lib/scripts/filter-build-matrix with ShellSpec tests, following the existing script+test pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
SBOM Quality Gate
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pathsfield to each entry in.github/image-matrix.jsonmapping images to their source filesload-matrixjob inbuild.ymlto filter the matrix by PR changed files (via GitHub API)flake.nix,flake.lock,common/lib/,common/pkgs/, or workflow files changepathsfield in pre-release and cleanup workflows (which always process all images)Test plan
common/images/redis.nix— verify onlyredisimage buildsflake.lock— verify all 7 images buildapps/sbomify/deployments/compose/Caddyfile.dev— verify onlysbomify-caddy-devbuilds🤖 Generated with Claude Code