Skip to content

Commit

Permalink
github/actions/image-upload: Use SFTP instead of SCP to upload images…
Browse files Browse the repository at this point in the history
… to the server

Signed-off-by: Din Music <[email protected]>
  • Loading branch information
MusicDin committed Mar 25, 2024
1 parent 3c79fed commit 0a5fd1a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/actions/image-upload/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ runs:
# Move image content.
mv ${SRC_DIR}/* "${PRODUCT_PATH}/${VERSION}"
# s -> Uses SFTP protocol
# r -> Copies files recursively
# p -> Preserves modification and access times
scp -srp -P ${SSH_PORT} ${SRC_DIR}-upload/* "${SSH_USER}@${SSH_HOST}:"
# Use SFTP to upload images to the server.
sftp -P ${SSH_PORT} "${SSH_USER}@${SSH_HOST}" <<EOF
put -r ${SRC_DIR}-upload/*
bye
EOF

0 comments on commit 0a5fd1a

Please sign in to comment.