Add parameter for extra options

This commit is contained in:
Herman verschooten 2021-05-06 19:03:27 +02:00
parent c72c8bbce7
commit 08d0e7cde1
3 changed files with 6 additions and 2 deletions

View file

@ -10,6 +10,7 @@ Action to send dist files to a remote server with scp command
- `port`: SSH Port
- `user`: SSH User name
- `key`: Private key
- `options` : Extra options for scp
### To publish

View file

@ -21,9 +21,12 @@ inputs:
key:
description: 'Private key'
required: true
options:
description: 'Extra options for scp'
required: false
runs:
using: 'docker'
image: 'Dockerfile'
branding:
icon: 'upload-cloud'
color: 'blue'
color: 'blue'

View file

@ -4,4 +4,4 @@ echo -e "${INPUT_KEY}" >__TEMP_INPUT_KEY_FILE
chmod 600 __TEMP_INPUT_KEY_FILE
scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "${INPUT_PORT}" -r ${INPUT_SRC} "${INPUT_USER}"@"${INPUT_HOST}":"${INPUT_REMOTE}"
scp -o StrictHostKeyChecking=no -v -i __TEMP_INPUT_KEY_FILE -P "${INPUT_PORT}" $INPUT_OPTIONS -r ${INPUT_SRC} "${INPUT_USER}"@"${INPUT_HOST}":"${INPUT_REMOTE}"