mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 13:49:54 +00:00
[CI] Remove cache clean action
This action has never worked due to permission issues, and because of how GitHub handles caches it wouldn't reliably help cache anyway.
This commit is contained in:
parent
3f5b871666
commit
2f4234d315
1 changed files with 0 additions and 32 deletions
32
.github/workflows/cache_cleanup.yml
vendored
32
.github/workflows/cache_cleanup.yml
vendored
|
|
@ -1,32 +0,0 @@
|
|||
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#force-deletion-of-caches-overriding-default-cache-eviction-policy
|
||||
name: 🧹 Cache Cleanup
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
name: Cleanup PR caches
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# `actions:write` permission is required to delete caches
|
||||
actions: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Cleanup
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
run: |
|
||||
echo "Fetching list of cache key"
|
||||
cache_keys_for_pr=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
|
||||
# Setting this to not fail the workflow while deleting cache keys.
|
||||
set +e
|
||||
echo "Deleting caches..."
|
||||
for cache_key in $cache_keys_for_pr; do
|
||||
gh cache delete $cache_key
|
||||
echo "Deleted: $cache_key"
|
||||
done
|
||||
echo "Done"
|
||||
Loading…
Add table
Add a link
Reference in a new issue