diff --git a/.github/workflows/promotion-checker.yml b/.github/workflows/promotion-checker.yml index e18836d4..1da3c698 100644 --- a/.github/workflows/promotion-checker.yml +++ b/.github/workflows/promotion-checker.yml @@ -38,7 +38,7 @@ jobs: - name: Check if pr.yml succeeded id: check_pr_workflow 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..." @@ -46,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