Skip to content

Commit

Permalink
[actions] in .github/workflows/manual*, comment out the cleaning of a…
Browse files Browse the repository at this point in the history
…ll caches
  • Loading branch information
valassi committed Nov 1, 2023
1 parent ccb4f09 commit ecd538e
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ jobs:
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

# See https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
cleanup:
runs-on: ubuntu-latest
permissions:
actions: write # this is required to delete caches
contents: read
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
echo "Fetching list of cache key"
cacheKeys=$(gh actions-cache list -R $REPO | cut -f 1 )
set +e # do not fail while deleting cache keys
echo "Deleting caches..."
for cacheKey in $cacheKeys; do gh actions-cache delete $cacheKey -R $REPO --confirm; done
echo "Deleting caches... done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#cleanup:
# runs-on: ubuntu-latest
# permissions:
# actions: write # this is required to delete caches
# contents: read
# steps:
# - name: Cleanup
# run: |
# gh extension install actions/gh-actions-cache
# REPO=${{ github.repository }}
# echo "Fetching list of cache keys"
# cacheKeys=$(gh actions-cache list -R $REPO | cut -f 1 )
# set +e # do not fail while deleting cache keys
# echo "Deleting caches..."
# for cacheKey in $cacheKeys; do gh actions-cache delete $cacheKey -R $REPO --confirm; done
# echo "Deleting caches... done"
# env:
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Expand Down

0 comments on commit ecd538e

Please sign in to comment.