Skip to content

Commit 5cc9a8a

Browse files
ci: resolve the upgrade-from base branch inside a merge group too
Signed-off-by: Nicholas Bucher <behappy54321@gmail.com>
1 parent 7643650 commit 5cc9a8a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/actions/upgrade-test-setup/action.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,12 @@ runs:
3030
- name: Resolve upgrade-from version
3131
id: resolve
3232
shell: bash
33+
env:
34+
MERGE_GROUP_BASE_REF: ${{ github.event.merge_group.base_ref }}
3335
run: |
34-
base_ref="${GITHUB_BASE_REF:-${GITHUB_REF_NAME:-}}"
36+
# A merge group has no GITHUB_BASE_REF; its ref name is gh-readonly-queue/<base>/pr-N-<sha>.
37+
base_ref="${GITHUB_BASE_REF:-${MERGE_GROUP_BASE_REF#refs/heads/}}"
38+
base_ref="${base_ref:-${GITHUB_REF_NAME:-}}"
3539
is_release_line=false
3640
if [[ "$base_ref" =~ ^release/v[0-9]+\.[0-9]+\.x$ ]]; then
3741
is_release_line=true

0 commit comments

Comments
 (0)