From 85642a1727f595fc858f4a78df4d8e23d86c7ffa Mon Sep 17 00:00:00 2001 From: Bryce Thorup Date: Fri, 30 Aug 2024 15:53:33 -0600 Subject: [PATCH] a --- action.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/action.sh b/action.sh index b109981..09db8c9 100755 --- a/action.sh +++ b/action.sh @@ -1,6 +1,8 @@ -message="$(git log)" -if [[ $message == *"__post__"* ]]; then - curl -u "$INPUT_LISTMONK_USER:$INPUT_LISTMONK_PASS" -X GET 'https://mailer.tarupgard.com/api/campaigns?page=1&per_page=100' +COMMIT_MESSAGE="$(git log)" +if [[ $COMMIT_MESSAGE == *"__post__"* ]]; then + [[ ${COMMIT_MESSAGE} =~ __post__([[:digit:]]{6}) ]] && POST_NUMBER=${BASH_REMATCH[1]} + echo $POST_NUMBER + # curl -u "$INPUT_LISTMONK_USER:$INPUT_LISTMONK_PASS" -X GET 'https://mailer.tarupgard.com/api/campaigns?page=1&per_page=100' fi