Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Commit

Permalink
Fix diff computation for PR container builds
Browse files Browse the repository at this point in the history
If a PR branch contained several commits but its HEAD had changes to some files not relevant for container build, the no image would be built completely for that PR
  • Loading branch information
rm3l committed Feb 17, 2024
1 parent d1cb94d commit d3f1153
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr-container-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
run: |
# don't fail if nothing returned by grep
set +e
CHANGES="$(git diff --name-only HEAD~1 | \
CHANGES="$(git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | \
grep -E "workflows/.+-container-build.yaml|Makefile|bundle/|config/|go.mod|go.sum|.+\.go|docker/|\.dockerignore" | \
grep -v -E ".+_test.go|/.rhdh/")";
echo "Changed files for this commit:"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: |
# don't fail if nothing returned by grep
set +e
CHANGES="$(git diff --name-only HEAD~1 | \
CHANGES="$(git diff --name-only ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | \
grep -E "workflows/pr.yaml|Makefile|bundle/|config/|go.mod|go.sum|.+\.go" | \
grep -v -E "/.rhdh/")";
echo "Changed files for this commit:"
Expand Down

0 comments on commit d3f1153

Please sign in to comment.