Update entrypoint.sh
This commit is contained in:
parent
c6d9be15a7
commit
0010c2adf6
|
@ -1,18 +1,10 @@
|
||||||
#!/usr/bin/env bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Set deploy key
|
# Start the SSH agent and load key.
|
||||||
SSH_PATH="$HOME/.ssh"
|
source agent-start "$GITHUB_ACTION"
|
||||||
|
echo "$INPUT_REMOTE_KEY" | agent-add
|
||||||
# Create .ssh dir if it doesn't exist
|
|
||||||
[ -d "$SSH_PATH" ] || mkdir "$SSH_PATH"
|
|
||||||
|
|
||||||
# Place deploy_key into .ssh dir
|
|
||||||
echo "$INPUT_REMOTE_KEY" > "$SSH_PATH/key"
|
|
||||||
|
|
||||||
# Set r+w to user only
|
|
||||||
chmod 600 "$SSH_PATH/key"
|
|
||||||
|
|
||||||
# Do deployment
|
# Do deployment
|
||||||
sh -c "rsync $INPUT_SWITCHES -e 'ssh -i $SSH_PATH/key -o StrictHostKeyChecking=no -p $INPUT_REMOTE_PORT $INPUT_RSH' $GITHUB_WORKSPACE/$INPUT_PATH $INPUT_REMOTE_USER@$INPUT_REMOTE_HOST:$INPUT_REMOTE_PATH"
|
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"
|
||||||
|
|
Loading…
Reference in New Issue