ci(actions): Exit in case of error
Signed-off-by: rjshrjndrn <rjshrjndrn@gmail.com>
This commit is contained in:
parent
8cf2a04e41
commit
4f288f00ca
1 changed files with 5 additions and 1 deletions
6
.github/workflows/workers.yaml
vendored
6
.github/workflows/workers.yaml
vendored
|
|
@ -63,7 +63,7 @@ jobs:
|
|||
#
|
||||
# Getting the images to build
|
||||
#
|
||||
set -x
|
||||
set -xe
|
||||
touch /tmp/images_to_build.txt
|
||||
skip_security_checks=${{ github.event.inputs.skip_security_checks }}
|
||||
tmp_param=${{ github.event.inputs.build_service }}
|
||||
|
|
@ -98,6 +98,10 @@ jobs:
|
|||
[[ "x$skip_security_checks" == "xtrue" ]] || {
|
||||
curl -L https://github.com/aquasecurity/trivy/releases/download/v0.34.0/trivy_0.34.0_Linux-64bit.tar.gz | tar -xzf - -C ./
|
||||
./trivy image --exit-code 1 --vuln-type os,library --severity "HIGH,CRITICAL" --ignore-unfixed $DOCKER_REPO/$image:$IMAGE_TAG
|
||||
err_code=$?
|
||||
[[ $err_code -ne 0 ]] && {
|
||||
exit $err_code
|
||||
}
|
||||
} && {
|
||||
echo "Skipping Security Checks"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue