Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Commit

Permalink
Merge pull request #31 from dumastaylorPFG/failActionifCdkCommandFails
Browse files Browse the repository at this point in the history
fail action if cdk subcommand exits with non-zero exit code
  • Loading branch information
youyo authored Jan 16, 2021
2 parents b8e9f11 + fe3ac05 commit 43aa32e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 43aa32e

Please sign in to comment.