diff --git a/entrypoint.sh b/entrypoint.sh index 7590f5e..68add03 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,17 @@ #!/bin/sh -l +if [ -z "${INPUT_DINGTOKEN}" ] +then + echo "dingToken is required!" + exit 1 +fi + +if [ -z "${INPUT_MESSAGE}" ] +then + echo "message is required!" + exit 1 +fi + url="https://oapi.dingtalk.com/robot/send?access_token=${INPUT_DINGTOKEN}" curl "$url" \