From b0cc94e655f638b7b76ee3a2acf4b8cd47c6995b Mon Sep 17 00:00:00 2001 From: Mac Siri Date: Thu, 21 Mar 2024 18:24:40 -0400 Subject: [PATCH] [CI] Update cleanup-cache action (#20788) --- .github/workflows/cleanup-cache.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cleanup-cache.yml b/.github/workflows/cleanup-cache.yml index e5118310f..8985f34c0 100644 --- a/.github/workflows/cleanup-cache.yml +++ b/.github/workflows/cleanup-cache.yml @@ -8,17 +8,12 @@ jobs: cleanup: runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v3 - name: Cleanup run: | gh extension install actions/gh-actions-cache - REPO=${{ github.repository }} - BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" - echo "Fetching list of cache key" - cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 ) + cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) ## Setting this to not fail the workflow while deleting cache keys. set +e @@ -30,4 +25,5 @@ jobs: echo "Done" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - + REPO: ${{ github.repository }} + BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge