mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 07:40:48 -08:00
ci: delete cache after artifacts upload in canary workflow (#9177)
This commit is contained in:
10
.github/workflows/canary.yaml
vendored
10
.github/workflows/canary.yaml
vendored
@@ -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)
|
||||
@@ -58,3 +60,9 @@ jobs:
|
||||
name: trivy_macOS-ARM64
|
||||
path: dist/trivy_*_macOS-ARM64.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Delete cache after upload
|
||||
run: |
|
||||
gh cache delete "$CACHE_KEY" --confirm
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user