From d8dce471170e52bd60cddb4d52cf82e9a515e65b Mon Sep 17 00:00:00 2001 From: TheiLLeniumStudios <104288623+TheiLLeniumStudios@users.noreply.github.com> Date: Mon, 6 Feb 2023 10:30:19 +0000 Subject: [PATCH] Use variables --- action.yml | 1 + entrypoint.sh | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index a82f143..93414af 100644 --- a/action.yml +++ b/action.yml @@ -5,6 +5,7 @@ inputs: description: "Restart resources individually or restart the whole server" required: false default: true + type: boolean serverIP: description: "IP of the FiveM server" required: true diff --git a/entrypoint.sh b/entrypoint.sh index 5188ad4..f3ec578 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,5 +1,18 @@ #!/bin/sh -l +RESTART_INDIVIDUAL_RESOURCES=$1 + +if [ "$RESTART_INDIVIDUAL_RESOURCES" = true ] ; then + echo "Will restart individual resources" +else + echo "Will restart the whole server" +fi + +SERVER_IP=$2 +SERVER_PORT=$3 +RCON_PASSWORD=$4 +RESOURCES_FOLDER=$5 + echo "$1" echo "$2" echo "$3" @@ -17,7 +30,6 @@ else # Push git fetch origin ${GITHUB_EVENT_BEFORE} --depth=1 export DIFF=$( git diff --name-only ${GITHUB_EVENT_BEFORE} ${GITHUB_SHA} ) - echo $DIFF echo "Diff between ${GITHUB_EVENT_BEFORE} and ${GITHUB_SHA}" fi