Skip to content

Commit

Permalink
Issue checkstyle#15614: Create a cache cleanup in regression-report.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
piyush kumar sadangi authored and romani committed Sep 7, 2024
1 parent 2d5bfc1 commit 62a3e5a
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/regression-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -626,25 +626,3 @@ jobs:
with:
message: ${{steps.out.outputs.message}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Clean up cache
if: always()
run: |
echo "Cleaning up cache..."
# List of cache keys to remove
CACHE_KEYS=(
"${{ env.CACHE_KEY_PR }}"
"${{ env.CACHE_KEY_MASTER }}"
"${{ env.CACHE_KEY_CONTRIBUTION }}"
"${{ env.CACHE_KEY_CONFIG_FILES }}"
"${{ env.CACHE_KEY_GENERATED_CONFIGS }}"
)
for key in "${CACHE_KEYS[@]}"; do
echo "Removing cache with key: $key"
curl --fail-with-body -X DELETE \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/actions/caches?key=$key"
done
echo "Cache cleanup completed."

0 comments on commit 62a3e5a

Please sign in to comment.