Skip to content

Commit

Permalink
Have cache invalidation not run on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
gerrod3 committed Oct 22, 2024
1 parent cafd0ef commit b60f314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/actions/base_images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit b60f314

Please sign in to comment.