From 731c33a2e95ab11b77ccdfde852ca151741bcb20 Mon Sep 17 00:00:00 2001 From: shockrah Date: Sat, 28 Sep 2024 14:56:34 -0700 Subject: [PATCH] removing bash style checks --- action.yml | 32 +++++++++++++++----------------- entrypoint.sh | 13 ------------- 2 files changed, 15 insertions(+), 30 deletions(-) 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