mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-05 19:08:18 +00:00
Added a workflow to clear up all cache
Signed-off-by: mr. m <91018726+mauro-balades@users.noreply.github.com>
This commit is contained in:
24
.github/workflows/clear-all-cache.yml
vendored
Normal file
24
.github/workflows/clear-all-cache.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: cleanup all caches
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Cleanup
|
||||
run: |
|
||||
echo "Fetching list of cache key"
|
||||
cacheKeysForPR=$(gh cache list --limit 100 --json id --jq '.[].id')
|
||||
|
||||
## Setting this to not fail the workflow while deleting cache keys.
|
||||
set +e
|
||||
echo "Deleting caches..."
|
||||
for cacheKey in $cacheKeysForPR
|
||||
do
|
||||
gh cache delete $cacheKey
|
||||
done
|
||||
echo "Done"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
Reference in New Issue
Block a user