From ea3f2b7314b6866f0d082ea849fa090adb9c8456 Mon Sep 17 00:00:00 2001 From: Steven Agyekum Date: Mon, 22 Jun 2020 21:40:12 +0200 Subject: [PATCH] improve code-formatting --- entrypoint.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index a95b8b0..6590803 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,6 +4,14 @@ source agent-start "$GITHUB_ACTION" echo "$INPUT_REMOTE_KEY" | agent-add -# Add strict errors and deploy. +# Add strict errors. set -eu -sh -c "rsync $INPUT_SWITCHES -e 'ssh -o StrictHostKeyChecking=no -p $INPUT_REMOTE_PORT $INPUT_RSH' $GITHUB_WORKSPACE/$INPUT_PATH $INPUT_REMOTE_USER@$INPUT_REMOTE_HOST:$INPUT_REMOTE_PATH" + +# Variables. +SWITCHES="$INPUT_SWITCHES" +RSH="ssh -o StrictHostKeyChecking=no -p $INPUT_REMOTE_PORT $INPUT_RSH" +LOCAL_PATH="$GITHUB_WORKSPACE/$INPUT_PATH" +DSN="$INPUT_REMOTE_USER@$INPUT_REMOTE_HOST" + +# Deploy. +sh -c "rsync $SWITCHES -e '$RSH' $LOCAL_PATH $DSN:$INPUT_REMOTE_PATH"