File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ inputs:
1313 description : >-
1414 What Trivy data to cache; one or more of restore, save, success, or use.
1515
16+ database :
17+ default : update
18+ description : >-
19+ How Trivy should handle its data; one of update or skip.
20+
1621 setup :
1722 default : v0.57.0,cache
1823 description : >-
6772 env :
6873 TRIVY_CACHE_DIR : >-
6974 ${{ contains(fromJSON(steps.parsed.outputs.cache), 'use') && inputs.cache-directory || '' }}
75+ TRIVY_SKIP_CHECK_UPDATE : ${{ inputs.database == 'skip' }}
76+ TRIVY_SKIP_DB_UPDATE : ${{ inputs.database == 'skip' }}
77+ TRIVY_SKIP_JAVA_DB_UPDATE : ${{ inputs.database == 'skip' }}
7078 run : |
7179 # Run Trivy
7280 trivy '${{ inputs.scan-type }}' '${{ inputs.scan-target }}' || result=$?
Original file line number Diff line number Diff line change 1616 cache :
1717 # Run only one of these jobs at a time across the entire project.
1818 concurrency : { group: trivy-cache }
19+ # Do not fail this workflow when this job fails.
20+ continue-on-error : true
1921
2022 runs-on : ubuntu-latest
2123 steps :
2931 TRIVY_SCANNERS : license,secret,vuln
3032
3133 licenses :
34+ # Run this job after the cache job regardless of its success or failure.
3235 needs : [cache]
36+ if : >-
37+ ${{ !cancelled() }}
38+
3339 runs-on : ubuntu-latest
3440 steps :
3541 - uses : actions/checkout@v4
@@ -48,13 +54,16 @@ jobs:
4854 TRIVY_SCANNERS : license
4955 with :
5056 cache : restore,use
57+ database : skip
5158
5259 vulnerabilities :
53- if : ${{ github.repository == 'CrunchyData/postgres-operator' }}
60+ # Run this job after the cache job regardless of its success or failure.
61+ needs : [cache]
62+ if : >-
63+ ${{ github.repository == 'CrunchyData/postgres-operator' && !cancelled() }}
5464 permissions :
5565 security-events : write
5666
57- needs : [cache]
5867 runs-on : ubuntu-latest
5968 steps :
6069 - uses : actions/checkout@v4
6877 TRIVY_SCANNERS : secret,vuln
6978 with :
7079 cache : restore,use
80+ database : skip
7181
7282 # Produce a SARIF report of actionable results. This step fails only when
7383 # Trivy is unable to scan.
8090 TRIVY_SCANNERS : secret,vuln
8191 with :
8292 cache : use
93+ database : skip
8394 setup : none
8495
8596 # Submit the SARIF report to GitHub code scanning. Pull requests checks
You can’t perform that action at this time.
0 commit comments