Sfoglia il codice sorgente

fix(action): enhance cache hit logging to display detailed cache keys and sizes

Co-authored-by: Copilot <copilot@github.com>
TheWildJames 4 mesi fa
parent
commit
096563c8b1
1 ha cambiato i file con 6 aggiunte e 2 eliminazioni
  1. 6 2
      .github/workflows/build.yml

+ 6 - 2
.github/workflows/build.yml

@@ -210,8 +210,12 @@ jobs:
       run: |
         if [ "${{ steps.restore-caches.outputs.cache-hit }}" = "true" ]; then
           echo "✅ Cache HIT"
-          echo "   Keys: ${{ steps.restore-caches.outputs.cache-key }}"
-          echo "   Sizes: ${{ steps.restore-caches.outputs.cache-size }}"
+          IFS=',' read -ra KEYS <<< "${{ steps.restore-caches.outputs.cache-key }}"
+          IFS=',' read -ra SIZES <<< "${{ steps.restore-caches.outputs.cache-size }}"
+          
+          for i in "${!KEYS[@]}"; do
+            echo "   [${i}] ${KEYS[$i]} (${SIZES[$i]})"
+          done
         else
           echo "❌ No caches found - Fresh build"
         fi