diff --git a/entrypoint.sh b/entrypoint.sh index e5942e3..d1ef21a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -68,8 +68,11 @@ function runCdk(){ echo "${output}" commentStatus="Failed" - if [ "${exitCode}" == "0" -o "${exitCode}" == "1" ]; then + if [ "${exitCode}" == "0" ]; then commentStatus="Success" + elif [ "${exitCode}" != "0" ]; then + echo "CDK subcommand ${INPUT_CDK_SUBCOMMAND} for stack ${INPUT_CDK_STACK} has failed. See above console output for more details." + exit 1 fi if [ "$GITHUB_EVENT_NAME" == "pull_request" ] && [ "${INPUT_ACTIONS_COMMENT}" == "true" ]; then