Skip to content

Commit

Permalink
Merge pull request #688 from gerrod3/cache-clear-options
Browse files Browse the repository at this point in the history
Have cache invalidation not run on pull requests
  • Loading branch information
ggainey authored Oct 23, 2024
2 parents cafd0ef + 3fda76b commit ccfbb55
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
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
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:
- name: Build base images
id: build_base_images
uses: "./.github/actions/base_images"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
python_version: "3.9"

Expand Down

0 comments on commit ccfbb55

Please sign in to comment.