Skip to content

Commit bc2f54e

Browse files
committed
CI: Fix job step condition
The shell command would fail if pushing images was disabled: image-build-logs/push-failed-images.txt: No such file or directory [: -gt: unary operator expected
1 parent a4c43ed commit bc2f54e

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
@@ -325,7 +325,7 @@ jobs:
325325

326326
- name: Fail when images failed to push
327327
run: if [ $(wc -l < image-build-logs/push-failed-images.txt) -gt 0 ]; then cat image-build-logs/push-failed-images.txt && exit 1; fi
328-
if: ${{ !cancelled() }}
328+
if: ${{ inputs.push && !cancelled() }}
329329

330330
# NOTE(seunghun1ee): Currently we want to mark the job fail only when critical CVEs are detected.
331331
# This can be used again instead of "Fail when critical vulnerabilities are found" when it's

0 commit comments

Comments
 (0)