Skip to content

Commit b01f4eb

Browse files
committed
Filter julia caches at source in cleanup workflow
Non-julia caches could otherwise fill the first 100 rows of gh cache list and push stale julia entries out of the window, leaving them uncleaned.
1 parent e5d3655 commit b01f4eb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/cleanup-caches.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ jobs:
9090
run: |
9191
echo "::group::Julia cache list for $REF"
9292
93-
caches=$(gh cache list --ref "$REF" --limit 100 --json id,key,createdAt,sizeInBytes \
94-
| jq -c '[.[] | select(.key | startswith("julia-cache"))]')
93+
# Filter at source with --key (prefix match) so non-julia caches
94+
# don't push stale julia entries past the --limit window.
95+
caches=$(gh cache list --ref "$REF" --key julia-cache --limit 100 --json id,key,createdAt,sizeInBytes)
9596
total=$(echo "$caches" | jq 'length')
9697
9798
echo "Found $total julia cache(s) on $REF"

0 commit comments

Comments
 (0)