fix 'retry jobs' failing when there's no job to retry...

This commit is contained in:
Sergio R. Caprile
2026-09-02 11:14:37 -03:00
parent 140fa6cebf
commit 8346a60971
+1 -1
View File
@@ -14,7 +14,7 @@ jobs:
run: |
min=$(date -u -d '5 hours ago' +%s)
max=$(date -u -d '2 hours ago' +%s)
gh api --paginate "/repos/$GITHUB_REPOSITORY/actions/workflows/nightly.yml/runs?status=failure&per_page=100" --jq '.workflow_runs[] | select(.run_attempt == 1) | [.id, .updated_at] | @tsv' |
gh api --paginate "/repos/$GITHUB_REPOSITORY/actions/workflows/nightly.yml/runs?status=failure&per_page=100" --jq '.workflow_runs[] | select(.run_attempt == 1) | [.id, .created_at] | @tsv' |
while IFS=$'\t' read -r id updated; do
when=$(date -u -d "$updated" +%s)
if [ "$when" -ge "$min" ] && [ "$when" -le "$max" ]; then