Skip to content

chore: bump v1.2.1

chore: bump v1.2.1 #37

Workflow file for this run

name: Clean Caches
on:
push:
#branches: [ "master", "beta" ]
paths:
- '**/package-lock.json'
- '**/yarn.lock'
- '**/package.json'
pull_request:
paths:
- '**/package-lock.json'
- '**/yarn.lock'
- '**/package.json'
workflow_dispatch:
# run single job
concurrency:
group: clean-caches
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: true
runs-on: ubuntu-latest
name: Cache Cleaner
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.ACCESS_TOKEN }}
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
- name: Cleanup caches
shell: bash
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=${{ github.ref }}
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | 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
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}