From 2861b51f66c11f1cff3ec4d95469cfe7fd9dc8ba Mon Sep 17 00:00:00 2001 From: Dimitris Platis Date: Tue, 8 Aug 2023 12:54:40 +0300 Subject: [PATCH] Allow user to add SSH-specific arguments This can be useful in cases where some more intricate ways to contact the remote server are necessary, e.g. adding '-o' arguments. --- README.md | 1 + entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d10bcbe..4696217 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ example usage to sync everything in the workspace folder: env: DEPLOY_KEY: ${{ secrets.SERVER_SSH_KEY }} ARGS: "-e -c -r --delete" + SSH_ARGS: "-vvvv" SERVER_PORT: ${{ secrets.SERVER_PORT }} FOLDER: "./" SERVER_IP: ${{ secrets.SERVER_IP }} diff --git a/entrypoint.sh b/entrypoint.sh index 1ec1802..de9fddb 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -9,4 +9,4 @@ echo "$DEPLOY_KEY" > "$SSHPATH/key" chmod 600 "$SSHPATH/key" SERVER_DEPLOY_STRING="$USERNAME@$SERVER_IP:$SERVER_DESTINATION" # sync it up" -sh -c "rsync $ARGS -e 'ssh -i $SSHPATH/key -o StrictHostKeyChecking=no -p $SERVER_PORT' $GITHUB_WORKSPACE/$FOLDER $SERVER_DEPLOY_STRING" +sh -c "rsync $ARGS -e 'ssh -i $SSHPATH/key -o StrictHostKeyChecking=no -p $SERVER_PORT $SSH_ARGS' $GITHUB_WORKSPACE/$FOLDER $SERVER_DEPLOY_STRING"