fix: 修正 jq 指令

This commit is contained in:
Jeffery
2025-12-01 11:37:33 +08:00
parent 551e7bce3b
commit b07b80d8b6

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