From 1029e146e548361f9037325e46fbb6e4566ea984 Mon Sep 17 00:00:00 2001 From: Jeffery Date: Mon, 1 Dec 2025 11:04:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=8E=92=E9=99=A4=E5=AF=A6=E9=9A=9B?= =?UTF-8?q?=E5=88=AA=E9=99=A4=E6=95=B8=E9=87=8F=E7=82=BA=E7=A9=BA=E7=9A=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/action.yml b/action.yml index ae7cb4c..236f819 100644 --- a/action.yml +++ b/action.yml @@ -107,6 +107,13 @@ runs: FINAL_DELETE_COUNT=$(echo "$TO_DELETE" | jq -s 'length') echo "🔍 [模擬執行] 總共會刪除 $FINAL_DELETE_COUNT 個版本" else + # 重新獲取並計算實際刪除的數量 + NEW_RELEASES_JSON=$(curl -s "${{ inputs.gitea-server }}/api/v1/repos/${{ inputs.repository }}/releases" \ + -H "Authorization: token ${{ inputs.token }}" \ + -H "Accept: application/json") + NEW_TOTAL_COUNT=$(echo "$NEW_RELEASES_JSON" | jq 'length') + ACTUAL_DELETED=$((TOTAL_COUNT - NEW_TOTAL_COUNT)) + echo "✅ 清理完成,實際刪除了 $ACTUAL_DELETED 個版本" fi