removing bash style checks

This commit is contained in:
shockrah 2024-09-28 14:56:34 -07:00
parent 6333f32c32
commit 731c33a2e9
2 changed files with 15 additions and 30 deletions

View File

@ -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'

View File

@ -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