2121
2222 echo "[DEBUG] Fetching cache list..."
2323 # Get full cache details
24- CACHE_LIST=$(gh cache list --ref $BRANCH --limit 100 --json key,sizeInBytes,createdAt, id)
24+ CACHE_LIST=$(gh cache list --ref $BRANCH --limit 100 --json key,sizeInBytes,id)
2525
2626 if [ -z "$CACHE_LIST" ] || [ "$CACHE_LIST" = "[]" ]; then
2727 echo "[DEBUG] No caches found"
@@ -30,11 +30,11 @@ jobs:
3030 fi
3131
3232 # Create table header
33- echo "| Cache ID | Cache Key | Size | Created At | Status | " >> $GITHUB_STEP_SUMMARY
34- echo "|----------|-----------|------|------------|--------| " >> $GITHUB_STEP_SUMMARY
33+ echo "| Cache ID | Cache Key | Size |" >> $GITHUB_STEP_SUMMARY
34+ echo "|----------|-----------|------|" >> $GITHUB_STEP_SUMMARY
3535
3636 # Extract IDs and process deletions
37- echo "$CACHE_LIST" | jq -r '.[] | [.id, .key, .sizeInBytes, .createdAt ] | @tsv' | while IFS=$'\t' read -r id key size created ; do
37+ echo "$CACHE_LIST" | jq -r '.[] | [.id, .key, .sizeInBytes] | @tsv' | while IFS=$'\t' read -r id key size; do
3838 # Convert size to human readable format
3939 if [ $size -ge 1048576 ]; then
4040 readable_size=$(echo "scale=2; $size/1048576" | bc)"MB"
@@ -43,16 +43,11 @@ jobs:
4343 fi
4444
4545 echo "[DELETE] Processing cache ID: $id"
46- if gh cache delete $id > /dev/null 2>&1; then
47- status="✅ Deleted"
48- echo "[SUCCESS] Cache $id deleted"
49- else
50- status="❌ Failed"
51- echo "[ERROR] Failed to delete cache $id"
52- fi
46+ gh cache delete $id
47+ echo "[INFO] Processed cache $id"
5348
5449 # Add row to summary table
55- echo "| \`$id\` | \`$key\` | $readable_size | $created | $status | " >> $GITHUB_STEP_SUMMARY
50+ echo "| \`$id\` | \`$key\` | $readable_size |" >> $GITHUB_STEP_SUMMARY
5651 done
5752
5853 # Add completion timestamp
0 commit comments