ci: fix build-docker-auto re-building Dockerfiles on every PR push#389
Merged
kelly-sovacool merged 1 commit intodevfrom Apr 17, 2026
Merged
Conversation
- Replace knu/changed-files@v1 with git diff HEAD~1 HEAD to scope file detection to the latest commit only (not full PR diff) - Add fetch-depth: 2 to get-files checkout for parent commit access - Guard build-docker job with if condition to skip when matrix is empty Agent-Logs-Url: https://github.com/CCBR/Dockers2/sessions/40678bbc-3f69-4380-95b3-9af2a243041a Co-authored-by: kelly-sovacool <17768269+kelly-sovacool@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
kelly-sovacool
April 17, 2026 18:57
View session
Member
|
fixes CCBR/actions#151 |
kelly-sovacool
added a commit
to CCBR/actions
that referenced
this pull request
Apr 17, 2026
2 tasks
kelly-sovacool
added a commit
to CCBR/actions
that referenced
this pull request
Apr 17, 2026
* fix: update build-docker examples from Dockers2 see CCBR/Dockers2#389 resolves #151 * chore: update CHANGELOG.md
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.
GitHub's
pull_requestpathsfilter matches the full PR diff (base→head), not just the latest commit. Combined withknu/changed-files@v1using the same full-diff comparison, once any Dockerfile appeared anywhere in a PR,build-dockerwould re-run for all of them on every subsequent push — even commits that only touched docs or CI files.Changes
knu/changed-files@v1withgit diff HEAD~1 HEAD— scopes Dockerfile detection to the single commit that was just pushed instead of the cumulative PR diff; addfetch-depth: 2to make the parent commit availablebuild-dockerwith anifcondition — skips the job entirely when the matrix is empty, so the workflow starting (due to thepathsfilter) no longer causes spurious builds