Skip to content

Commit

Permalink
Merge pull request #687 from gerrod3/clear-cache
Browse files Browse the repository at this point in the history
Delete base-images cache entry on rebuild
  • Loading branch information
mdellweg authored Oct 22, 2024
2 parents 1803759 + 15fa92c commit c8c83b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/actions/base_images/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,14 @@ runs:
gzip base-images.tar
shell: bash

- name: Clear cache for next upload
if: env.BUILD_IMAGES && steps.cache.outputs.cache-hit == 'true'
run: |
echo "Deleting existing cache for ${{ steps.hash_key.outputs.base_cache_key }}"
gh extension install actions/gh-actions-cache
gh actions-cache delete "base-images=${{ steps.hash_key.outputs.base_cache_key }}" --R ${{ github.repository }} -B ${{ github.ref }} --confirm
shell: bash

- name: Cache podman images
if: env.BUILD_IMAGES
uses: actions/cache/save@v3
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
- name: Build App Image
id: build_image
uses: "./.github/actions/build_image"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
image_name: ${{ matrix.image_name }}
image_variant: "stable"
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ jobs:
- name: Build base images
id: build_base_images
uses: "./.github/actions/base_images"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
python_version: ${{ env.PYTHON_VERSION }}

Expand Down

0 comments on commit c8c83b8

Please sign in to comment.