ensure args exists

This commit is contained in:
zcong1993 2019-08-26 15:37:16 +08:00
parent 9cca1b5dbd
commit b532a604f2
1 changed files with 12 additions and 0 deletions

View File

@ -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" \