diff --git a/.github/workflows/cleanup_caches.yml b/.github/workflows/cleanup_caches.yml index 526a728011..cd673ef887 100644 --- a/.github/workflows/cleanup_caches.yml +++ b/.github/workflows/cleanup_caches.yml @@ -16,6 +16,7 @@ on: permissions: contents: read packages: read + actions: write jobs: check_paths: @@ -30,17 +31,15 @@ jobs: steps: - name: Cleanup run: | - gh extension install actions/gh-actions-cache - echo "Fetching list of cache key" - cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) + cacheKeysForPR=$(gh cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) ## Setting this to not fail the workflow while deleting cache keys. set +e echo "Deleting caches..." for cacheKey in $cacheKeysForPR do - gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm + gh cache delete $cacheKey -R $REPO -B $BRANCH --confirm done echo "Done" env: