From d3bb57111c5b09eb4b4e8d804231c6838f9220f1 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sun, 31 Dec 2023 16:26:02 +0100 Subject: [PATCH] add sftp port as configuration --- action.yml | 4 ++++ entrypoint.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index d8f6c38..99f28e4 100644 --- a/action.yml +++ b/action.yml @@ -17,6 +17,10 @@ inputs: sftp-host: description: "Sftp host" required: true + sftp-port: + description: "Sftp port" + default: "22" + required: true runs: using: "docker" image: "Containerfile" diff --git a/entrypoint.sh b/entrypoint.sh index e4d239b..613467e 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,4 +1,4 @@ #!/bin/sh set -e -lftp -e "set sftp:auto-confirm yes; open -u $INPUT_SFTP_USER,$INPUT_SFTP_PW $SFTP_INPUT_HOST; mirror -v --no-perms --delete --reverse $INPUT_SOURCE $INPUT_DESTINATION; quit" +lftp -e "set sftp:auto-confirm yes; open -p $INPUT_SFTP_PORT -u $INPUT_SFTP_USER,$INPUT_SFTP_PW $SFTP_INPUT_HOST; mirror -v --no-perms --delete --reverse $INPUT_SOURCE $INPUT_DESTINATION; quit"