Skip to content

Commit

Permalink
fix cache for first sca scan
Browse files Browse the repository at this point in the history
  • Loading branch information
saisiatishkarra authored and Water-Melon committed Aug 16, 2024
1 parent d4a5680 commit bb7b5c9
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,18 @@ jobs:
echo "amd64_sha=$amd64_sha" >> $GITHUB_OUTPUT
echo "arm64_sha=$arm64_sha"
echo "arm64_sha=$arm64_sha" >> $GITHUB_OUTPUT
# Reuse cache first time if exists
# Otherwise fail the job entirely
- name: Cache Grype DB
id: cache-grype-1
uses: actions/cache@v3
env:
cache-name: cache-grype-db
with:
# Grype cache files are stored in `~/.cache/grype/db` on Linux/macOS
path: ~/.cache/grype/db
key: ${{ env.cache-name }}

- name: Scan AMD64 Image digest
id: sbom_action_amd64
Expand All @@ -491,6 +503,8 @@ jobs:
with:
asset_prefix: kong-${{ needs.metadata.outputs.commit-sha }}-${{ matrix.label }}-linux-amd64
image: ${{ needs.metadata.outputs.prerelease-docker-repository }}:${{ needs.metadata.outputs.commit-sha }}-${{ matrix.label }}
env:
GRYPE_DB_AUTO_UPDATE: ${{ steps.cache-grype-1.outputs.cache-hit != 'true' && 'true' || 'false' }}

- name: Cache Grype DB
id: cache-grype
Expand Down

0 comments on commit bb7b5c9

Please sign in to comment.