From 185d14791f87411aa4e9602ae5930d29a7e47d39 Mon Sep 17 00:00:00 2001 From: George King <98261225+GeorgeK1ng@users.noreply.github.com> Date: Wed, 3 Sep 2025 14:21:23 +0200 Subject: [PATCH] Update cache_cleanup.yml --- .github/workflows/cache_cleanup.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cache_cleanup.yml b/.github/workflows/cache_cleanup.yml index 379344c61..702db76f8 100644 --- a/.github/workflows/cache_cleanup.yml +++ b/.github/workflows/cache_cleanup.yml @@ -1,4 +1,4 @@ -name: Cleanup GitHub runner caches on closed pull requests +name: Cleanup GitHub runner caches on closed PRs on: pull_request: types: @@ -16,8 +16,8 @@ jobs: GH_REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} run: | - # List caches whose key contains "-PR-" - ids=$(gh cache list --limit 2000 --json id,key --jq ".[] | select(.key | contains(\"-PR-${PR_NUMBER}\")) | .id") + # List caches whose key contains "-PR--" + ids=$(gh cache list --limit 2000 --json id,key --jq ".[] | select(.key | test(\"-PR-${PR_NUMBER}-\")) | .id") # Delete them (best effort) set +e