diff --git a/action.yml b/action.yml index f60b815..0964af6 100644 --- a/action.yml +++ b/action.yml @@ -11,6 +11,9 @@ inputs: sam_command: description: "AWS SAM subcommand to execute." required: true + fail_command: + description: "Command to run on sam failing (to get logs etc.)" + required: false actions_comment: description: "Whether or not to comment on pull requests." default: false diff --git a/entrypoint.sh b/entrypoint.sh index 7fb6b30..42a4fd4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -63,6 +63,10 @@ ${output} fi if [ "${exitCode}" == "1" ]; then + if [ "${INPUT_FAIL_COMMAND}" != "" ]; then + echo "Executing fail command; ${INPUT_FAIL_COMMAND@Q}"; + eval "${INPUT_FAIL_COMMAND}"; + fi exit 1 fi }