From 73fed0e15ec5fc4d44e4b61d6a58adbe33fd0276 Mon Sep 17 00:00:00 2001 From: zcong1993 Date: Thu, 29 Aug 2019 16:48:20 +0800 Subject: [PATCH] more flexiable --- action.yml | 4 ++-- entrypoint.sh | 18 +++++------------- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/action.yml b/action.yml index 432d553..1994b9a 100644 --- a/action.yml +++ b/action.yml @@ -8,8 +8,8 @@ inputs: dingToken: description: 'DingDing bot token' required: true - message: - description: 'Message to send' + body: + description: 'Post Body to send' required: true runs: diff --git a/entrypoint.sh b/entrypoint.sh index 57bbf5a..e061bcf 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,24 +6,16 @@ then exit 1 fi -if [ -z "${INPUT_MESSAGE}" ] +if [ -z "${INPUT_BODY}" ] then - echo "message is required!" + echo "body is required!" exit 1 fi -url="https://oapi.dingtalk.com/robot/send?access_token=${INPUT_DINGTOKEN}" +echo "body: $INPUT_BODY" -body=$(cat <