Skip to content

Commit d6793ce

Browse files
ci(fix): update cleanup_caches.yml to use new cache management commands and fix permissions
#4297
1 parent 54cf47a commit d6793ce

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

.github/workflows/cleanup_caches.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ on:
1616
permissions:
1717
contents: read
1818
packages: read
19+
actions: write
1920

2021
jobs:
2122
check_paths:
@@ -30,17 +31,15 @@ jobs:
3031
steps:
3132
- name: Cleanup
3233
run: |
33-
gh extension install actions/gh-actions-cache
34-
3534
echo "Fetching list of cache key"
36-
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
35+
cacheKeysForPR=$(gh cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
3736
3837
## Setting this to not fail the workflow while deleting cache keys.
3938
set +e
4039
echo "Deleting caches..."
4140
for cacheKey in $cacheKeysForPR
4241
do
43-
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
42+
gh cache delete $cacheKey -R $REPO -B $BRANCH --confirm
4443
done
4544
echo "Done"
4645
env:

0 commit comments

Comments
 (0)