Skip to content

Commit c8c12d6

Browse files
fix(ci): ignore main [skip-build] commits in PR image check
Use git log --first-parent when scanning for [skip-build] so merged main chore commits do not skip building commit-specific PR tags Prow waits for. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d630e97 commit c8c12d6

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/actions/check-image-and-changes/action.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ runs:
4141
echo "Changed files:"
4242
echo "$CHANGED_FILES"
4343
44-
# Check for [skip-build] tag in commit messages
44+
# Check for [skip-build] on PR commits only. Without --first-parent, merge
45+
# refs pull in main chore commits like "update rpms.lock.yaml [skip-build]".
4546
SKIP_BUILD_TAG=false
46-
if git log --format=%B "$BASE_COMMIT"..HEAD | grep -qF "[skip-build]"; then
47+
if git log --first-parent --format=%B "$BASE_COMMIT"..HEAD | grep -qF "[skip-build]"; then
4748
echo "Found [skip-build] tag in commit messages."
4849
SKIP_BUILD_TAG=true
4950
fi

0 commit comments

Comments
 (0)