ci: delete cache after artifacts upload in canary workflow (#9177)

This commit is contained in:
Teppei Fukuda
2025-07-11 11:27:44 +04:00
committed by GitHub
parent a822ace03e
commit 94c751fffb

View File

@@ -23,12 +23,14 @@ jobs:
name: Upload binaries
needs: build-binaries # run this job after 'build-binaries' job completes
runs-on: ubuntu-latest
env:
CACHE_KEY: ${{ runner.os }}-bins-${{ github.workflow }}-${{ github.sha }}
steps:
- name: Restore Trivy binaries from cache
uses: actions/cache@v4
with:
path: dist/
key: ${{ runner.os }}-bins-${{github.workflow}}-${{github.sha}}
key: ${{ env.CACHE_KEY }}
# Upload artifacts
- name: Upload artifacts (trivy_Linux-64bit)
@@ -57,4 +59,10 @@ jobs:
with:
name: trivy_macOS-ARM64
path: dist/trivy_*_macOS-ARM64.tar.gz
if-no-files-found: error
if-no-files-found: error
- name: Delete cache after upload
run: |
gh cache delete "$CACHE_KEY" --confirm
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}