From 5e7bb39b028806b6ab856fdd1046737c443a6578 Mon Sep 17 00:00:00 2001 From: Blake Pettersson Date: Mon, 23 Feb 2026 03:34:44 +0900 Subject: [PATCH] chore: use base ref for cherry-pick prs (#26551) Signed-off-by: Blake Pettersson --- hack/update-manifests.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hack/update-manifests.sh b/hack/update-manifests.sh index b388312372..3612ff982a 100755 --- a/hack/update-manifests.sh +++ b/hack/update-manifests.sh @@ -70,6 +70,10 @@ fi # if the tag has not been declared, and we are on a release branch, use the VERSION file. if [ "$IMAGE_TAG" = "" ]; then branch=$(git rev-parse --abbrev-ref HEAD) + # In GitHub Actions PRs, HEAD is detached; use GITHUB_BASE_REF (the target branch) instead + if [ "$branch" = "HEAD" ] && [ -n "${GITHUB_BASE_REF:-}" ]; then + branch="$GITHUB_BASE_REF" + fi if [[ $branch = release-* ]]; then pwd IMAGE_TAG=v$(cat "$SRCROOT/VERSION")