mirror of
https://gitee.com/jack_whh/SFTP-Deploy-Action.git
synced 2026-03-09 23:12:55 +08:00
@@ -36,7 +36,9 @@ inputs:
|
||||
password:
|
||||
description: "SSH passsword,If a password is set, the secret key pair is ignored"
|
||||
required: false
|
||||
|
||||
script:
|
||||
description: "upload files after exec script"
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: 'docker'
|
||||
@@ -52,6 +54,7 @@ runs:
|
||||
- ${{ inputs.sftpArgs }}
|
||||
- ${{ inputs.delete_remote_files }}
|
||||
- ${{ inputs.password }}
|
||||
- ${{ inputs.script }}
|
||||
|
||||
branding:
|
||||
icon: 'upload-cloud'
|
||||
|
||||
@@ -62,6 +62,8 @@ echo 'SFTP Start'
|
||||
printf "%s" "put -r $5 $6" >$TEMP_SFTP_FILE
|
||||
#-o StrictHostKeyChecking=no avoid Host key verification failed.
|
||||
sftp -b $TEMP_SFTP_FILE -P $3 $8 -o StrictHostKeyChecking=no -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2
|
||||
|
||||
if [ -z != ${11} ]; then
|
||||
ssh -o StrictHostKeyChecking=no -p $3 -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2 $11
|
||||
fi
|
||||
echo 'Deploy Success'
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user