init
This commit is contained in:
commit
4a197eed1d
4 changed files with 91 additions and 0 deletions
15
entrypoint.sh
Normal file
15
entrypoint.sh
Normal file
|
@ -0,0 +1,15 @@
|
|||
mkdir -p ~/.ssh/
|
||||
|
||||
# Print the SSH key, replacing newline characters with actual new lines
|
||||
echo "$INPUT_REMOTE_KEY" | tr -d '\r' > ~/.ssh/id_rsa
|
||||
|
||||
# Set appropriate permissions for the SSH key
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
|
||||
# Add the remote host's key to the known_hosts file to avoid authenticity confirmation
|
||||
ssh-keyscan -H $INPUT_REMOTE_HOST >> ~/.ssh/known_hosts
|
||||
|
||||
# SCP files to the remote host
|
||||
rsync ${INPUT_RSYNC_PARAMETERS} public/ ${INPUT_REMOTE_USER}@${INPUT_REMOTE_HOST}:${INPUT_REMOTE_PATH}
|
||||
|
||||
exit 0
|
Loading…
Add table
Add a link
Reference in a new issue