Rework action inputs

This commit is contained in:
eikendev
2020-03-31 20:09:22 +02:00
parent 21dbc832c5
commit b678edfef1
4 changed files with 8 additions and 23 deletions
+4 -15
View File
@@ -1,17 +1,6 @@
#!/usr/bin/env sh
if [ $# -ne 5 ]; then
printf "%s\n" "Usage: $0 <gotify_api_base> <gotify_app_token> <notification_title> <notification_message> <notification_priority>" >&2
exit 1
fi
gotify_api_base="$1"
gotify_app_token="$2"
notification_title="$3"
notification_message="$4"
notification_priority="$5"
curl "$gotify_api_base/message?token=$gotify_app_token" \
-F "title=$notification_title" \
-F "message=$notification_message" \
-F "priority=$notification_priority"
curl "$INPUT_GOTIFY_API_BASE/message?token=$INPUT_GOTIFY_APP_TOKEN" \
-F "title=$INPUT_NOTIFICATION_TITLE" \
-F "message=$INPUT_NOTIFICATION_MESSAGE" \
-F "priority=$INPUT_NOTIFICATION_PRIORITY"