diff --git a/.github/workflows/workers.yaml b/.github/workflows/workers.yaml index dd1bcc1e8..472d48a67 100644 --- a/.github/workflows/workers.yaml +++ b/.github/workflows/workers.yaml @@ -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" }