Skip to content

Commit cebf2a7

Browse files
committed
fix: [#251] prevent workflow failure and artifact name conflicts
1 parent 5b09357 commit cebf2a7

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/docker-security-scan.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555

5656
- name: Run Trivy vulnerability scanner
5757
uses: aquasecurity/[email protected]
58+
continue-on-error: true
59+
id: trivy-scan
5860
with:
5961
image-ref: torrust-tracker-deployer/${{ matrix.image.name }}:latest
6062
format: "sarif"
@@ -67,7 +69,7 @@ jobs:
6769
uses: actions/upload-artifact@v4
6870
if: always()
6971
with:
70-
name: sarif-project-${{ matrix.image.name }}
72+
name: sarif-project-${{ matrix.image.name }}-${{ github.run_id }}
7173
path: "trivy-results-${{ matrix.image.name }}.sarif"
7274
retention-days: 30
7375

@@ -98,6 +100,8 @@ jobs:
98100

99101
- name: Run Trivy vulnerability scanner
100102
uses: aquasecurity/[email protected]
103+
continue-on-error: true
104+
id: trivy-scan
101105
with:
102106
image-ref: ${{ matrix.image }}
103107
format: "sarif"
@@ -114,7 +118,7 @@ jobs:
114118
uses: actions/upload-artifact@v4
115119
if: always()
116120
with:
117-
name: sarif-third-party-${{ steps.sanitize.outputs.name }}
121+
name: sarif-third-party-${{ steps.sanitize.outputs.name }}-${{ github.run_id }}
118122
path: "trivy-results.sarif"
119123
retention-days: 30
120124

@@ -129,7 +133,7 @@ jobs:
129133
- name: Download all SARIF artifacts
130134
uses: actions/download-artifact@v4
131135
with:
132-
pattern: sarif-*
136+
pattern: sarif-*-${{ github.run_id }}
133137
merge-multiple: false
134138

135139
- name: Upload SARIF files to GitHub Security

0 commit comments

Comments
 (0)