Skip to content

Commit 743c1bc

Browse files
committed
Try fix job re-run
1 parent 19e785f commit 743c1bc

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/retry-test-jobs.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)