mirror of
https://github.com/Burnett01/rsync-deployments.git
synced 2025-04-14 09:11:03 +02:00
* Reference JoshPiper/rsync-docker @ 1.1.0 * See: https://github.com/JoshPiper/rsync-docker/tree/1.1.0 * New features: Support passphrase protected keys * supply SSH_PASS (key passphrase) to agent-add Read more about the behavior: https://github.com/JoshPiper/rsync-docker#agent-askpass * add new remote_key_pass config option * Update README.md * Update README.md * 2.0 is EOL * support 5.0, drop 2.0 * default to empty string * reference JoshPiper/rsync-docker @ v1.2.0
17 lines
464 B
Bash
Executable file
17 lines
464 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Start the SSH agent and load key.
|
|
source agent-start "$GITHUB_ACTION"
|
|
echo "$INPUT_REMOTE_KEY" | SSH_PASS="$INPUT_REMOTE_KEY_PASS" agent-add
|
|
|
|
# Add strict errors.
|
|
set -eu
|
|
|
|
# Variables.
|
|
SWITCHES="$INPUT_SWITCHES"
|
|
RSH="ssh -o StrictHostKeyChecking=no -p $INPUT_REMOTE_PORT $INPUT_RSH"
|
|
LOCAL_PATH="$GITHUB_WORKSPACE/$INPUT_PATH"
|
|
DSN="$INPUT_REMOTE_USER@$INPUT_REMOTE_HOST"
|
|
|
|
# Deploy.
|
|
sh -c "rsync $SWITCHES -e '$RSH' $LOCAL_PATH $DSN:$INPUT_REMOTE_PATH"
|