From 1050e688b3d982cadc0962245510e524746962f8 Mon Sep 17 00:00:00 2001 From: aliziel <21992503+aliziel@users.noreply.github.com> Date: Fri, 3 Apr 2026 11:46:43 -0400 Subject: [PATCH 1/2] ci: reference head via environment --- .github/workflows/promotion-checker.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/promotion-checker.yml b/.github/workflows/promotion-checker.yml index e18836d4..d0f82996 100644 --- a/.github/workflows/promotion-checker.yml +++ b/.github/workflows/promotion-checker.yml @@ -37,8 +37,10 @@ jobs: - name: Check if pr.yml succeeded id: check_pr_workflow + env: + HEAD_REF: ${{ github.event.pull_request.head.ref }} run: | - WORKFLOW_STATUS=$(gh run list --repo ${{ github.repository }} --branch ${{ github.event.pull_request.head.ref }} --workflow "pr.yml" --json status --jq '.[0].status // "not found"') + WORKFLOW_STATUS=$(gh run list --repo ${{ github.repository }} --branch "$HEAD_REF" --workflow "pr.yml" --json status --jq '.[0].status // "not found"') echo "Previous workflow (pr.yml) status: $WORKFLOW_STATUS" if [ "$WORKFLOW_STATUS" != "completed" ]; then echo "Previous workflow (pr.yml) did not complete successfully. Exiting..." From 3c6624687f296f432c9d9f026024d3f512cb1d1c Mon Sep 17 00:00:00 2001 From: aliziel <21992503+aliziel@users.noreply.github.com> Date: Fri, 3 Apr 2026 11:57:19 -0400 Subject: [PATCH 2/2] fix: move to existing env block --- .github/workflows/promotion-checker.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/promotion-checker.yml b/.github/workflows/promotion-checker.yml index d0f82996..1da3c698 100644 --- a/.github/workflows/promotion-checker.yml +++ b/.github/workflows/promotion-checker.yml @@ -37,8 +37,6 @@ jobs: - name: Check if pr.yml succeeded id: check_pr_workflow - env: - HEAD_REF: ${{ github.event.pull_request.head.ref }} run: | WORKFLOW_STATUS=$(gh run list --repo ${{ github.repository }} --branch "$HEAD_REF" --workflow "pr.yml" --json status --jq '.[0].status // "not found"') echo "Previous workflow (pr.yml) status: $WORKFLOW_STATUS" @@ -48,6 +46,7 @@ jobs: fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + HEAD_REF: ${{ github.event.pull_request.head.ref }} trigger-promotion-workflow: runs-on: ubuntu-latest