Sfoglia il codice sorgente

Fix cache restore asset matching to exclude checksum files

TheWildJames 4 mesi fa
parent
commit
d2ed4682dc
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      .github/actions/cache-restore/action.yml

+ 1 - 1
.github/actions/cache-restore/action.yml

@@ -143,7 +143,7 @@ runs:
             [ -z "$KEY" ] && continue
             echo "::group:: [$((idx+1))/${#PATHS_ARRAY[@]}] Searching Prefix: $KEY"
             
-            MATCH=$(echo "$ALL_ASSETS" | grep "^cache-$KEY" | sort -r | head -n 1 || true)
+            MATCH=$(echo "$ALL_ASSETS" | grep -E "^cache-$KEY.*\.(tzst|tar)(\.part[a-z]{2})?$" | sort -r | head -n 1 || true)
             
             if [ -z "$MATCH" ]; then
                 echo "Not found."