Allow source to be unquoted
This commit is contained in:
+9
-1
@@ -20,6 +20,10 @@ inputs:
|
|||||||
source:
|
source:
|
||||||
description: "Which files to copy"
|
description: "Which files to copy"
|
||||||
required: true
|
required: true
|
||||||
|
quote-source:
|
||||||
|
description: "Whether to quote the source string"
|
||||||
|
required: true
|
||||||
|
default: 'true'
|
||||||
target:
|
target:
|
||||||
description: "Where on the host to copy the files"
|
description: "Where on the host to copy the files"
|
||||||
required: true
|
required: true
|
||||||
@@ -98,7 +102,11 @@ runs:
|
|||||||
- name: Transfer files
|
- name: Transfer files
|
||||||
run: |
|
run: |
|
||||||
echo "Transferring files"
|
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
|
shell: bash
|
||||||
|
|
||||||
- name: Cleanup
|
- name: Cleanup
|
||||||
|
|||||||
Reference in New Issue
Block a user