File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,25 +26,25 @@ jobs:
2626 RUN_ID : ${{ github.event.workflow_run.id }}
2727 run : |
2828 echo "Inspecting jobs of workflow run $RUN_ID in $REPO"
29-
30- jobs_json="$(gh api repos/$REPO/actions/runs/$RUN_ID/jobs)"
31-
29+
30+ jobs_json="$(gh api -R $REPO repos/$REPO/actions/runs/$RUN_ID/jobs)"
31+
3232 echo "Jobs and conclusions:"
3333 echo "$jobs_json" | jq '.jobs[] | {name: .name, conclusion: .conclusion}'
34-
34+
3535 failed_matrix_jobs=$(echo "$jobs_json" | jq '
3636 [ .jobs[]
3737 | select(.conclusion == "failure"
3838 and (.name | contains(" API-")))
3939 ]
4040 | length
4141 ')
42-
42+
4343 echo "Failed Integration Tests matrix jobs: $failed_matrix_jobs"
44-
44+
4545 if [ "$failed_matrix_jobs" -gt 0 ]; then
4646 echo "Detected failing Integration Tests jobs – re-running failed jobs for this run."
47- gh run rerun "$RUN_ID" --failed
47+ gh run rerun -R $REPO "$RUN_ID" --failed
4848 else
4949 echo "Only non-matrix jobs (like Test Results) failed – not auto-rerunning."
50- fi
50+ fi
You can’t perform that action at this time.
0 commit comments