From 1e00b1fed50ac88f78d128e4bd4e9243cecdae3e Mon Sep 17 00:00:00 2001 From: Henry Park Date: Thu, 12 Mar 2026 21:32:28 -0700 Subject: [PATCH] fix(ci): checkout promotion PR head for metadata refresh (#1097) --- .github/workflows/staging-promotion-metadata.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/staging-promotion-metadata.yml b/.github/workflows/staging-promotion-metadata.yml index 63591d83..76b8326b 100644 --- a/.github/workflows/staging-promotion-metadata.yml +++ b/.github/workflows/staging-promotion-metadata.yml @@ -31,10 +31,12 @@ jobs: github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: - - name: Checkout base branch + - name: Checkout workflow source uses: actions/checkout@v6 with: - ref: ${{ github.event_name == 'workflow_dispatch' && 'main' || github.event.pull_request.base.ref }} + # For chained promotion PRs, the script lives on the trusted PR head, + # not necessarily on the older promotion branch used as the PR base. + ref: ${{ github.event_name == 'workflow_dispatch' && 'main' || github.event.pull_request.head.sha }} fetch-depth: 0 fetch-tags: true