From d5e3b4324aad6f5acaf97171365d9c416027fa1f Mon Sep 17 00:00:00 2001 From: Daniel Wu Date: Tue, 10 Nov 2026 10:47:08 +0800 Subject: [PATCH] =?UTF-8?q?fix(release):=20=E6=B8=85=E7=90=86=E8=8C=83?= =?UTF-8?q?=E5=9B=B4=E8=A1=A5=20cancelled=E2=80=94=E2=80=94=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E7=9A=84=20run=20=E5=90=8C=E6=A0=B7=E6=98=AF=E6=97=A0?= =?UTF-8?q?=E6=95=88=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 53b53eb..06735b6 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -56,7 +56,7 @@ jobs: while :; do RUNS=$(curl -sS -H "Authorization: token ${GITEA_TOKEN}" "${API}/repos/${REPO}/actions/tasks?limit=50&page=${PAGE}") TOTAL=$(echo "${RUNS}" | python3 -c "import json,sys; print(json.load(sys.stdin).get('total_count',0))") - echo "${RUNS}" | python3 -c "import json,sys; [print(r['url']) for r in json.load(sys.stdin).get('workflow_runs',[]) if r.get('status')=='failure']" | while read -r url; do + echo "${RUNS}" | python3 -c "import json,sys; [print(r['url']) for r in json.load(sys.stdin).get('workflow_runs',[]) if r.get('status') in ('failure','cancelled')]" | while read -r url; do RUN_API=$(echo "${url}" | sed "s|${GITHUB_SERVER_URL}/\\(.*\\)/actions/runs/|${API}/repos/\\1/actions/runs/|") echo "删除失败 run: ${url}" curl -sS -o /dev/null -X DELETE -H "Authorization: token ${GITEA_TOKEN}" "${RUN_API}"