diff --git a/README.md b/README.md index 3b8eaf6..2e664df 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ It is recommended to pass all sensitive values through `secrets` ```yaml name: Copy single file -uses: tempersama/rsync-action@2.2 +uses: tempersama/rsync-action@2.3 with: host: ${{ secrets.host }} source: html/ diff --git a/entrypoint.sh b/entrypoint.sh index c0ca7b9..774b826 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,13 +3,14 @@ set -e # Quick checks for missing parameters -rc=0 -empty() { echo ERROR: $1 is empty } +empty() { + echo "ERROR: $1 is empty" +} [[ "$INPUT_HOST" ]] && empty host [[ "$INPUT_SOURCE" ]] && empty source [[ "$INPUT_DESTINATION" ]] && empty destination -[[ "$INPUT_USERNME" ]] && empty username +[[ "$INPUT_USERNAME" ]] && empty username [[ "$INPUT_KEY" ]] && empty key @@ -21,6 +22,7 @@ chmod 400 key rsync \ -a -v \ --stats \ -e "ssh -o StrictHostKeyChecking=no -i key" \ - --port $INPUT_PORT \ + --port "$INPUT_PORT" \ "$INPUT_SOURCE" \ "$INPUT_USERNAME"@"$INPUT_HOST":"$INPUT_DESTINATION" +