diff --git a/action.yml b/action.yml index 2ee69e1..6476cd8 100644 --- a/action.yml +++ b/action.yml @@ -2,26 +2,24 @@ name: 'Rsync Copy' description: 'Copies the files from your repository to a remote host using rsync' author: 'temper' inputs: - # $1 + host: + description: 'IP Address or DNS of your target host' + required: true + source: + description: 'Source route folder' + required: true + destination: + description: 'Destination route folder' + required: true + username: + description: 'User for remote connection' + required: true + key: + description: 'Private SSH key' + required: true port: description: 'Port for SCP' default: 22 - # $2 - host: - description: 'IP Address or DNS of your target host' - # $3 - source: - description: 'Source route folder' - default: "./*" - # $4 - destination: - description: 'Destination route folder' - # $5 - username: - description: 'User for remote connection' - # $7 - key: - description: 'Private SSH key' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index 774b826..79c4a95 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,19 +2,6 @@ set -e -# Quick checks for missing parameters -empty() { - echo "ERROR: $1 is empty" -} - -[[ "$INPUT_HOST" ]] && empty host -[[ "$INPUT_SOURCE" ]] && empty source -[[ "$INPUT_DESTINATION" ]] && empty destination -[[ "$INPUT_USERNAME" ]] && empty username -[[ "$INPUT_KEY" ]] && empty key - - - echo -e "${INPUT_KEY}" > key chmod 400 key