Allow source to be unquoted

This commit is contained in:
2025-12-13 16:16:49 +09:00
parent 2eaf7b8d5d
commit e6d985b364

View File

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