removing bash style checks
This commit is contained in:
parent
6333f32c32
commit
731c33a2e9
32
action.yml
32
action.yml
@ -2,26 +2,24 @@ name: 'Rsync Copy'
|
|||||||
description: 'Copies the files from your repository to a remote host using rsync'
|
description: 'Copies the files from your repository to a remote host using rsync'
|
||||||
author: 'temper'
|
author: 'temper'
|
||||||
inputs:
|
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:
|
port:
|
||||||
description: 'Port for SCP'
|
description: 'Port for SCP'
|
||||||
default: 22
|
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:
|
runs:
|
||||||
using: 'docker'
|
using: 'docker'
|
||||||
image: 'Dockerfile'
|
image: 'Dockerfile'
|
||||||
|
@ -2,19 +2,6 @@
|
|||||||
|
|
||||||
set -e
|
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
|
echo -e "${INPUT_KEY}" > key
|
||||||
chmod 400 key
|
chmod 400 key
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user