diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index df6b99fad..52441b526 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -70,12 +70,12 @@ jobs: echo "build-output-dir=$(pwd)/build" >> "$GITHUB_OUTPUT" # Github job context unfortunately doesn't contain job_id, this is the workaround how to fetch it using GH API - # Example : build-and-test (runner, 2) + # Example : build-and-test (runner, 1) JOB_NAME="${{ github.job }} (${{ matrix.build.runs-on }}, ${{ matrix.test_group_id }})" echo "Expected job name: $JOB_NAME" - JOB_ID=$(curl -s -H "Authorization: token ${{ github.token }}" \ - "https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs" | \ - jq -r '.jobs[] | select(.name | contains("$JOB_NAME")) | .id') + JOB_ID=$(curl -s -H "Authorization: token $GH_TOKEN" \ + "https://api.github.com/repos/tenstorrent/tt-forge-fe/actions/runs/11514644813/jobs" | \ + jq -r '.jobs[] | select(.name | contains("'"${JOB_NAME}"'")) | .id ') echo "Current job id: $JOB_ID" echo "job-id=$JOB_ID" >> "$GITHUB_OUTPUT"