From ed7e3b721f00d7bd487aba95dfc197c01d359fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Kukuczka?= Date: Sun, 30 Mar 2025 12:34:33 +0200 Subject: [PATCH] fix quotes in SCP commands --- action.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/action.yml b/action.yml index c1f5a4d..e0c4e2f 100644 --- a/action.yml +++ b/action.yml @@ -1,7 +1,8 @@ name: 'Prepare Remote NFS Directories' description: | - Creates specified directories on a remote server (NFS mount) via SSH. Optionally prefixes directories - with a provided short SHA to isolate deployments. Skips execution if no directories are specified. + Creates specified directories on a remote NFS-mounted server via SSH. + Optionally prefixes directories with a provided short SHA to isolate deployments. + Skips execution if no directories are specified. inputs: ssh_host: @@ -16,7 +17,7 @@ inputs: directories: description: | Newline-separated list of local directories to create remotely and copy contents from. - Example: | + Example: config public/images public/icons @@ -70,11 +71,11 @@ runs: echo "DEBUG: Creating remote directory $REMOTE_DIR" ssh -o StrictHostKeyChecking=no -i "$SSH_KEY_FILE" \ "${{ inputs.ssh_user }}@${{ inputs.ssh_host }}" \ - "mkdir -p \"$REMOTE_DIR\" && chmod -R 755 \"$REMOTE_DIR\"" + "mkdir -p '$REMOTE_DIR' && chmod -R 755 '$REMOTE_DIR'" echo "DEBUG: Copying contents from local '$LOCAL_DIR' to remote '$REMOTE_DIR'" scp -o StrictHostKeyChecking=no -i "$SSH_KEY_FILE" -r "$LOCAL_DIR/"* \ - "${{ inputs.ssh_user }}@${{ inputs.ssh_host }}:\"$REMOTE_DIR/\"" || echo "DEBUG: No files to copy in '$LOCAL_DIR'" + "${{ inputs.ssh_user }}@${{ inputs.ssh_host }}:'$REMOTE_DIR/'" || echo "DEBUG: No files to copy in '$LOCAL_DIR'" CREATED_PATHS+="$REMOTE_DIR"$'\n' else