Allow source to be unquoted
This commit is contained in:
12
action.yml
12
action.yml
@@ -20,6 +20,10 @@ inputs:
|
||||
source:
|
||||
description: "Which files to copy"
|
||||
required: true
|
||||
quote-source:
|
||||
description: "Whether to quote the source string"
|
||||
required: true
|
||||
default: 'true'
|
||||
target:
|
||||
description: "Where on the host to copy the files"
|
||||
required: true
|
||||
@@ -98,11 +102,15 @@ runs:
|
||||
- name: Transfer files
|
||||
run: |
|
||||
echo "Transferring files"
|
||||
rsync ${{ inputs.args }} "${{ inputs.source }}" "targethost:${{ inputs.target }}"
|
||||
if [ "${{ inputs.quote-source }}" = "true" ]; then
|
||||
rsync ${{ inputs.args }} "${{ inputs.source }}" "targethost:${{ inputs.target }}"
|
||||
else
|
||||
rsync ${{ inputs.args }} ${{ inputs.source }} "targethost:${{ inputs.target }}"
|
||||
fi
|
||||
shell: bash
|
||||
|
||||
- name: Cleanup
|
||||
run: |
|
||||
echo "Cleaning up"
|
||||
rm -f ~/.ssh/{config,key,known_hosts} || true
|
||||
shell: bash
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user