From 8346a6097170ef440ec5f47eb9843a34597b7b2a Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Wed, 2 Sep 2026 11:14:37 -0300 Subject: [PATCH] fix 'retry jobs' failing when there's no job to retry... --- .github/workflows/nightly_retry.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly_retry.yml b/.github/workflows/nightly_retry.yml index 2b69a141..1cd7e6c5 100644 --- a/.github/workflows/nightly_retry.yml +++ b/.github/workflows/nightly_retry.yml @@ -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