Skip to content

Commit 9df2b1a

Browse files
committed
Only use kn-main if the ref has a kn- prefix
1 parent 07c11e4 commit 9df2b1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/actions/checkout-head/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ runs:
4949
echo "ref=$ref" >> "$GITHUB_OUTPUT"
5050
else
5151
baseref="main"
52-
if git ls-remote --exit-code --heads "https://github.com/$REPOSITORY.git" "kn-main"; then
52+
if [[ "$ref" == kn-* ]] && git ls-remote --exit-code --heads "https://github.com/$REPOSITORY.git" "kn-main"; then
5353
baseref="kn-main"
5454
elif [ -n "$GITHUB_BASE_REF" ]; then
5555
echo "attempting GH base ref: $GITHUB_BASE_REF"

0 commit comments

Comments
 (0)