From b60f314859a758f521918bf64449df3a5babb5f4 Mon Sep 17 00:00:00 2001 From: Gerrod Ubben Date: Tue, 22 Oct 2024 17:18:25 -0400 Subject: [PATCH] Have cache invalidation not run on pull requests --- .github/actions/base_images/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/base_images/action.yml b/.github/actions/base_images/action.yml index 42bc97ad..fdc54c90 100644 --- a/.github/actions/base_images/action.yml +++ b/.github/actions/base_images/action.yml @@ -103,7 +103,7 @@ runs: shell: bash - name: Clear cache for next upload - if: env.BUILD_IMAGES && steps.cache.outputs.cache-hit == 'true' + if: env.BUILD_IMAGES && steps.cache.outputs.cache-hit == 'true' && github.event_name != 'pull_request' run: | echo "Deleting existing cache for ${{ steps.hash_key.outputs.base_cache_key }}" gh cache delete "base-images=${{ steps.hash_key.outputs.base_cache_key }}" -R ${{ github.repository }}