mirror of
https://github.com/julia-actions/cache.git
synced 2026-02-12 01:16:54 +08:00
Unique cache-key for job matrix objects (#88)
* Unique cache-key for job matrix objects * Update workflow to use object in job matrix * Restore key should always match startswith * fixup! Unique cache-key for job matrix objects * Debug no-matrix * Tests require overriding workflow/job * Skip generating matrix_key when no matrix is used * Install jq for self-hosted runners * fixup! Install jq for self-hosted runners * Skip install when not needed * fixup! Skip install when not needed * fixup! Skip install when not needed * Improve `cache-name` description Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com> * Update description in README * Use actions/checkout@v4 in example * add missing period --------- Co-authored-by: Ian Butterworth <i.r.butterworth@gmail.com>
This commit is contained in:
@@ -13,7 +13,7 @@ function handle_caches()
|
||||
for _ in 1:5 # limit to avoid accidental rate limiting
|
||||
hits = split(strip(read(`gh cache list --limit 100 --repo $repo`, String)), keepempty=false)
|
||||
search_again = length(hits) == 100
|
||||
filter!(contains(restore_key), hits)
|
||||
filter!(startswith(restore_key), hits)
|
||||
isempty(hits) && break
|
||||
# We can delete everything that matches the restore key because the new cache is saved later.
|
||||
for c in hits
|
||||
|
||||
Reference in New Issue
Block a user