From e1a100cf5c08360d443c31d694db3b9e9e4f1d33 Mon Sep 17 00:00:00 2001 From: Arran Ubels Date: Thu, 19 Nov 2020 12:37:33 +1100 Subject: [PATCH 1/3] Update action.yml --- action.yml | 3 +++ 1 file changed, 3 insertions(+) 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 From c98feac3dead6e55c56e3d133ce23e67a82852c0 Mon Sep 17 00:00:00 2001 From: Arran Ubels Date: Thu, 19 Nov 2020 12:39:51 +1100 Subject: [PATCH 2/3] Update entrypoint.sh --- entrypoint.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/entrypoint.sh b/entrypoint.sh index 7fb6b30..43c4741 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -63,6 +63,10 @@ ${output} fi if [ "${exitCode}" == "1" ]; then + if [ "${fail_command}" != "" ]; then + echo "Executing fail command; ${fail_command@Q}"; + eval "${fail_command}"; + fi exit 1 fi } From dee039178de92fddc5773816cad9f3ad203be7ed Mon Sep 17 00:00:00 2001 From: Arran Ubels Date: Thu, 19 Nov 2020 12:44:41 +1100 Subject: [PATCH 3/3] Update entrypoint.sh --- entrypoint.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 43c4741..42a4fd4 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -63,9 +63,9 @@ ${output} fi if [ "${exitCode}" == "1" ]; then - if [ "${fail_command}" != "" ]; then - echo "Executing fail command; ${fail_command@Q}"; - eval "${fail_command}"; + if [ "${INPUT_FAIL_COMMAND}" != "" ]; then + echo "Executing fail command; ${INPUT_FAIL_COMMAND@Q}"; + eval "${INPUT_FAIL_COMMAND}"; fi exit 1 fi