Skip to content

Commit 2ce573b

Browse files
committed
chore: only upload trivy results for main branch
1 parent 2f74185 commit 2ce573b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ jobs:
191191

192192
- name: Run Trivy vulnerability scanner
193193
uses: aquasecurity/[email protected]
194+
if: github.ref == 'refs/heads/main'
194195
with:
195196
image-ref: envbox:latest
196197
format: sarif
@@ -199,12 +200,14 @@ jobs:
199200

200201
- name: Upload Trivy scan results to GitHub Security tab
201202
uses: github/codeql-action/upload-sarif@v2
203+
if: github.ref == 'refs/heads/main'
202204
with:
203205
sarif_file: trivy-results.sarif
204206
category: "Trivy"
205207

206208
- name: Upload Trivy scan results as an artifact
207209
uses: actions/upload-artifact@v3
210+
if: github.ref == 'refs/heads/main'
208211
with:
209212
name: trivy
210213
path: trivy-results.sarif

0 commit comments

Comments
 (0)