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 - `port`: SSH Port
- `user`: SSH User name - `user`: SSH User name
- `key`: Private key - `key`: Private key
- `options` : Extra options for scp
### To publish ### To publish

View file

@ -21,6 +21,9 @@ inputs:
key: key:
description: 'Private key' description: 'Private key'
required: true required: true
options:
description: 'Extra options for scp'
required: false
runs: runs:
using: 'docker' using: 'docker'
image: 'Dockerfile' image: 'Dockerfile'

View file

@ -4,4 +4,4 @@ echo -e "${INPUT_KEY}" >__TEMP_INPUT_KEY_FILE
chmod 600 __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}"