From ae39c515b5b9683a881d790d9db6502d6d13f18f Mon Sep 17 00:00:00 2001 From: Vladimir Milosevic Date: Mon, 14 Oct 2024 08:48:33 +0000 Subject: [PATCH] Print jobid --- .github/workflows/build-and-test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 239ac059c..1ad364b4f 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -3,6 +3,7 @@ name: Build and Test on: workflow_dispatch: workflow_call: + push: jobs: @@ -44,7 +45,8 @@ jobs: # Github job context unfortunately doesn't contain job_id, this is the workaround how to fetch it using GH API 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 | startswith("${{ github.job }}")) | .id') + jq -r '.jobs[] | select(.name | startswith("${{ github.job }}")) | .id') + echo "Current job id: $JOB_ID" echo "job-id=$JOB_ID" >> "$GITHUB_OUTPUT" echo "test_report_path=reports/report_$JOB_ID.xml" >> "$GITHUB_OUTPUT"