fix: 修正 jq 指令 #10

Merged
jiantw83 merged 1 commits from develop into master 2025-12-01 03:37:46 +00:00
Showing only changes of commit b07b80d8b6 - Show all commits

View File

@@ -161,7 +161,7 @@ runs:
echo "需要刪除 $DELETE_COUNT 個舊映像"
# 獲取要刪除的版本 (跳過前 keep-count 個)
TO_DELETE=$(echo "$SORTED_VERSIONS" | jq ".[${{ inputs.keep-count }}:]")
TO_DELETE=$(echo "$SORTED_VERSIONS" | jq -r ".[${{ inputs.keep-count }}:] | .[] | {id: .id, name: .name, created_at: .created_at}")
# 初始化刪除計數器和列表
DELETED_COUNT=0