rsync-deployments/entrypoint.sh

10 lines
348 B
Bash
Raw Normal View History

2020-01-05 12:11:59 +01:00
#!/bin/sh
2019-02-09 14:17:45 +01:00
2020-01-05 12:06:14 +01:00
# Start the SSH agent and load key.
source agent-start "$GITHUB_ACTION"
echo "$INPUT_REMOTE_KEY" | agent-add
2019-02-09 14:17:45 +01:00
2020-01-05 12:19:21 +01:00
# Add strict errors and deploy.
set -eu
2020-01-05 12:06:14 +01:00
sh -c "rsync $INPUT_SWITCHES -e 'ssh -o StrictHostKeyChecking=no -p $INPUT_REMOTE_PORT $INPUT_RSH' $GITHUB_WORKSPACE/$INPUT_PATH $INPUT_REMOTE_USER@$INPUT_REMOTE_HOST:$INPUT_REMOTE_PATH"