Files
SFTP-Deploy-Action/action.yml
JackWhh 16826b94db 1
Signed-off-by: JackWhh <5264499+jack_whh@user.noreply.gitee.com>
2024-07-18 09:30:05 +00:00

62 lines
1.6 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# action.yml
name: 'SFTP Deploy'
description: 'Deploy file to your server use sftp & ssh private key'
inputs:
username:
description: 'username'
required: true
server:
description: 'your sftp server'
required: true
port:
description: 'your sftp server port, default to 22'
required: true
default: "22"
ssh_private_key:
description: 'you can copy private_key from your *.pem file, keep format'
required: true
local_path:
description: 'will put all file under this path'
required: true
default: ./*
remote_path:
description: 'files will copy to under remote_path'
required: true
sftp_only:
description: 'connection via sftp protocol only'
required: false
default: false
sftpArgs:
description: 'sftp args'
required: false
delete_remote_files:
description: 'This operation will delete all files in the remote path before upload. Please be careful set this to true'
required: false
default: false
password:
description: "SSH passswordIf a password is set, the secret key pair is ignored"
required: false
script:
description: "upload files after exec script"
required: false
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.username }}
- ${{ inputs.server }}
- ${{ inputs.port }}
- ${{ inputs.ssh_private_key }}
- ${{ inputs.local_path }}
- ${{ inputs.remote_path }}
- ${{ inputs.sftp_only }}
- ${{ inputs.sftpArgs }}
- ${{ inputs.delete_remote_files }}
- ${{ inputs.password }}
- ${{ inputs.script }}
branding:
icon: 'upload-cloud'
color: 'purple'