Actualiser action.yaml

This commit is contained in:
2025-04-13 23:44:53 +02:00
parent e69f933a8c
commit 23113678a0

View File

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