From 2f4234d3159923e24b69135287aea77b730fdb0b Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Tue, 18 Nov 2025 15:40:47 +0100 Subject: [PATCH] [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. --- .github/workflows/cache_cleanup.yml | 32 ----------------------------- 1 file changed, 32 deletions(-) delete mode 100644 .github/workflows/cache_cleanup.yml diff --git a/.github/workflows/cache_cleanup.yml b/.github/workflows/cache_cleanup.yml deleted file mode 100644 index 9d2859a75fc..00000000000 --- a/.github/workflows/cache_cleanup.yml +++ /dev/null @@ -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"