Skip to content

Commit 43d7323

Browse files
committed
CI: Fix failure condition for container image builds when all images are dirty
In the case where all images contain HIGH CVEs, but none contain CRITICAL CVEs, we should not fail the build. However the condition previously failed if there were no images without any CVEs. This change modifies the condition to fail only when there are CRITICAL CVEs.
1 parent 1f7d8d7 commit 43d7323

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/stackhpc-container-image-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
run: mv image-scan-output image-build-logs/image-scan-output
233233

234234
- name: Fail if no images have passed scanning
235-
run: if [ $(wc -l < image-build-logs/image-scan-output/clean-images.txt) -le 0 ]; then exit 1; fi
235+
run: if [ $(wc -l < image-build-logs/image-scan-output/critical-images.txt) -eq 0 ]; then exit 1; fi
236236
if: ${{ !inputs.push-dirty }}
237237

238238
- name: Copy clean images to push-attempt-images list

0 commit comments

Comments
 (0)