Skip to content

Commit

Permalink
Tidy comments and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-forbes-cp committed Nov 25, 2024
1 parent 2dc230a commit b9369b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cache_clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ jobs:
GH_LIST_ARGS="-B main -L 100 --order desc --sort created-at"
GH_DELETE_ARGS="-B main --confirm"
echo CACHE PREFIXES FOR CLEANING ... $CACHE_PREFIX_LIST
# Generate current cache list for main, oldest first (note: 100 cache entries is gh maximum)
# Generate current cache list for main, newest first (note: 100 cache entries is gh maximum)
echo CACHE LIST BEFORE ...
gh actions-cache list $GH_LIST_ARGS | tee CACHE_LIST
# Generate corresponding list of cache keys for deletion - retain only the newest key for each prefix
DELETE_LIST=$(for CACHE_PREFIX in $CACHE_PREFIX_LIST ; do grep -E -o "^${CACHE_PREFIX}[^[:space:]]+" CACHE_LIST| sed '1d' ; done)
DELETE_LIST=$(for CACHE_PREFIX in $CACHE_PREFIX_LIST ; do grep -E -o "^${CACHE_PREFIX}[^[:space:]]+" CACHE_LIST | sed '1d' ; done)
echo DELETIONS ...
# Delete caches via keys in DELETE_LIST if not dryrun
# TODO remove non-dryrun echo for live use
Expand Down

0 comments on commit b9369b0

Please sign in to comment.