Skip to content

Commit 1c99ab0

Browse files
authored
Merge pull request #997 from softworkz/submit_rerun
Try fix retry-test-jobs
2 parents d9c8e04 + 73c56e2 commit 1c99ab0

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,18 @@ jobs:
3232
echo "Jobs and conclusions:"
3333
echo "$jobs_json" | jq '.jobs[] | {name: .name, conclusion: .conclusion}'
3434
35-
failed_matrix_jobs=$(echo "$jobs_json" | jq '
35+
failed_matrix_jobs=$(echo "$jobs_json" | jq -r '
3636
[ .jobs[]
3737
| select(.conclusion == "failure"
3838
and (.name | contains(" API-")))
3939
]
40-
| length
40+
| length // 0
4141
')
42+
failed_matrix_jobs=${failed_matrix_jobs:-0}
4243
43-
echo "Failed Integration Tests matrix jobs: $failed_matrix_jobs"
44-
45-
if [ "$failed_matrix_jobs" -gt 0 ]; then
44+
if [ "${failed_matrix_jobs}" -gt 0 ]; then
4645
echo "Detected failing Integration Tests jobs – re-running failed jobs for this run."
47-
gh run rerun -R $REPO "$RUN_ID" --failed
46+
gh run rerun -R "$REPO" "$RUN_ID" --failed
4847
else
4948
echo "Only non-matrix jobs (like Test Results) failed – not auto-rerunning."
5049
fi

0 commit comments

Comments
 (0)