From fd3b0480f5faa9c99550c90c209da2c75d2632de Mon Sep 17 00:00:00 2001 From: Tieu Long Date: Thu, 30 Apr 2026 02:36:00 +0700 Subject: [PATCH] fix(ci): skip deleted forks instead of failing the whole job --- .github/workflows/refresh-forks-list.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/refresh-forks-list.yml b/.github/workflows/refresh-forks-list.yml index 006644c..6240417 100644 --- a/.github/workflows/refresh-forks-list.yml +++ b/.github/workflows/refresh-forks-list.yml @@ -47,14 +47,18 @@ jobs: REPO=$(echo "$fork" | jq -r '.name') CREATED=$(echo "$fork" | jq -r '.created_at') - RUN_INFO=$(curl --silent --show-error --fail \ - --retry 5 --retry-delay 2 --retry-max-time 60 --retry-connrefused \ + RUN_INFO=$(curl --silent --show-error \ + --retry 3 --retry-delay 2 --retry-max-time 30 --retry-connrefused \ --connect-timeout 10 --max-time 30 \ -H "Authorization: Bearer $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ -H "X-GitHub-Api-Version: 2022-11-28" \ "https://api.github.com/repos/$OWNER/$REPO/actions/runs?per_page=1&status=success") + if echo "$RUN_INFO" | jq -e '.message' > /dev/null 2>&1; then + continue + fi + RUN_ID=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].id // ""') RUN_URL=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].html_url // "#"') RUN_DATE=$(echo "$RUN_INFO" | jq -r '.workflow_runs[0].run_started_at // "" | if . != "" then .[:10] else "" end') @@ -62,7 +66,7 @@ jobs: ARTIFACT_NAME="N/A" if [ -n "$RUN_ID" ] && [ "$RUN_ID" != "null" ]; then ARTIFACT_NAME=$(curl --silent --show-error \ - --retry 5 --retry-delay 2 --retry-max-time 60 --retry-connrefused \ + --retry 3 --retry-delay 2 --retry-max-time 30 --retry-connrefused \ --connect-timeout 10 --max-time 30 \ -H "Authorization: Bearer $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \