Skip to content

Commit

Permalink
Fix cache hashFiles statement
Browse files Browse the repository at this point in the history
  • Loading branch information
sbreker committed Apr 15, 2024
1 parent cf253e3 commit 9e3dc01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/generate-sbom.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- qa/**
- stable/**
- dev/produce-sbom

jobs:
generate-sbom:
Expand All @@ -20,12 +21,12 @@ jobs:
uses: actions/cache@v4
with:
path: .trivycache/
key: ${{ runner.os }}-trivy-${{ hashFiles('**/lockfiles') }}
key: ${{ runner.os }}-trivy-${{ hashFiles('requirements*.txt', '**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-trivy-
- name: Generate SBOM
run: trivy fs --format cyclonedx --file-patterns "pip:requirements.*\.txt" --include-dev-deps --output sbom.xml .
run: trivy fs --cache-dir .trivycache --format cyclonedx --file-patterns "pip:requirements.*\.txt" --include-dev-deps --output sbom.xml .
env:
TRIVY_NO_PROGRESS: "true"

Expand Down

0 comments on commit 9e3dc01

Please sign in to comment.