From d793aee881145e2c181ce94d4d4ec7b2551c28c4 Mon Sep 17 00:00:00 2001 From: Yadong Ding Date: Sat, 2 Dec 2023 12:09:54 +0800 Subject: [PATCH] action: delete clean-cache Signed-off-by: Yadong Ding --- .github/workflows/clean-cache.yml | 33 ------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 .github/workflows/clean-cache.yml diff --git a/.github/workflows/clean-cache.yml b/.github/workflows/clean-cache.yml deleted file mode 100644 index e4102f2b033..00000000000 --- a/.github/workflows/clean-cache.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Cleanup caches by a branch -on: - pull_request: - types: - - closed - -jobs: - cleanup: - runs-on: ubuntu-22.04 - 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 ) - - ## Setting this to not fail the workflow while deleting cache keys. - set +e - echo "Deleting caches..." - for cacheKey in $cacheKeysForPR - do - gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm - done - echo "Done" - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}