Actualiser action.yaml
This commit is contained in:
@@ -12,7 +12,7 @@ inputs:
|
||||
command:
|
||||
description: 'Command to sen to the server can be nothing, start, log or fail'
|
||||
required: false
|
||||
default: ''
|
||||
default: 'stop'
|
||||
message:
|
||||
description: 'Message to log with the ping'
|
||||
required: false
|
||||
@@ -29,13 +29,10 @@ runs:
|
||||
OPTIONS="-fsS -m 10 --retry 5"
|
||||
MESSAGE="${{ inputs.message }}"
|
||||
COMMAND="${{ input.command }}"
|
||||
|
||||
if [[ -n "$MESSAGE" ]] ; then
|
||||
MESSAGE="--data-raw \"${MESSAGE}\""
|
||||
fi
|
||||
|
||||
case "$COMMAND" in
|
||||
|
||||
start | log | fail)
|
||||
URL="${HEALTHPOINT}/$COMMAND"
|
||||
;;
|
||||
@@ -44,14 +41,11 @@ runs:
|
||||
URL="${HEALTHPOINT}"
|
||||
;;
|
||||
esac
|
||||
|
||||
RUN="curl $OPTIONS $MESSAGE '$URL'"
|
||||
eval "$RUN"
|
||||
|
||||
if [[ "$COMMAND"=="fail" ]] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user