mirror of
https://github.com/sebastianpopp/ftp-action.git
synced 2025-12-05 11:44:51 +01:00
Added port and ssl-protect-data true
This commit is contained in:
parent
ca3f8d253d
commit
4a45a7fdaa
3 changed files with 34 additions and 28 deletions
20
README.md
20
README.md
|
|
@ -19,6 +19,7 @@ jobs:
|
||||||
host: ${{ secrets.FTP_SERVER }}
|
host: ${{ secrets.FTP_SERVER }}
|
||||||
user: ${{ secrets.FTP_USERNAME }}
|
user: ${{ secrets.FTP_USERNAME }}
|
||||||
password: ${{ secrets.FTP_PASSWORD }}
|
password: ${{ secrets.FTP_PASSWORD }}
|
||||||
|
port: ${{ secrets.FTP_PORT }}
|
||||||
localDir: "dist"
|
localDir: "dist"
|
||||||
remoteDir: "www"
|
remoteDir: "www"
|
||||||
options: "--delete --asci"
|
options: "--delete --asci"
|
||||||
|
|
@ -26,12 +27,13 @@ jobs:
|
||||||
|
|
||||||
## Input parameters
|
## Input parameters
|
||||||
|
|
||||||
Input parameter | Description | Required | Default
|
| Input parameter | Description | Required | Default |
|
||||||
--- | --- | --- | ---
|
| --------------- | ------------------------------- | -------- | ------- |
|
||||||
host | FTP server name | Yes | N/A
|
| host | FTP server name | Yes | N/A |
|
||||||
user | FTP username | Yes | N/A
|
| user | FTP username | Yes | N/A |
|
||||||
password | FTP password | Yes | N/A
|
| password | FTP password | Yes | N/A |
|
||||||
localDir | The local directory to copy | No | .
|
| port | FTP port | No | 21 |
|
||||||
remoteDir | The remote directory to copy to | No | .
|
| localDir | The local directory to copy | No | . |
|
||||||
forceSsl | Force SSL encryption | No | false
|
| remoteDir | The remote directory to copy to | No | . |
|
||||||
options | Mirror command options | No | ''
|
| forceSsl | Force SSL encryption | No | false |
|
||||||
|
| options | Mirror command options | No | '' |
|
||||||
|
|
|
||||||
40
action.yml
40
action.yml
|
|
@ -1,35 +1,39 @@
|
||||||
name: 'ftp-action'
|
name: "ftp-action"
|
||||||
author: 'Sebastian Popp <ftp-action@sebastianpopp.com>'
|
author: "Sebastian Popp <ftp-action@sebastianpopp.com>"
|
||||||
description: 'Automate copying your files via FTP using this GitHub action.'
|
description: "Automate copying your files via FTP using this GitHub action."
|
||||||
inputs:
|
inputs:
|
||||||
host:
|
host:
|
||||||
description: 'FTP host'
|
description: "FTP host"
|
||||||
required: true
|
required: true
|
||||||
user:
|
user:
|
||||||
description: 'FTP user'
|
description: "FTP user"
|
||||||
required: true
|
required: true
|
||||||
password:
|
password:
|
||||||
description: 'FTP password'
|
description: "FTP password"
|
||||||
required: true
|
required: true
|
||||||
|
port:
|
||||||
|
description: "FTP port"
|
||||||
|
required: false
|
||||||
|
default: "21"
|
||||||
forceSsl:
|
forceSsl:
|
||||||
description: 'Force SSL encryption'
|
description: "Force SSL encryption"
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: "false"
|
||||||
localDir:
|
localDir:
|
||||||
description: 'Local directory'
|
description: "Local directory"
|
||||||
required: false
|
required: false
|
||||||
default: '.'
|
default: "."
|
||||||
remoteDir:
|
remoteDir:
|
||||||
description: 'Remote directory'
|
description: "Remote directory"
|
||||||
required: false
|
required: false
|
||||||
default: '.'
|
default: "."
|
||||||
options:
|
options:
|
||||||
description: 'Additional mirror command options'
|
description: "Additional mirror command options"
|
||||||
required: false
|
required: false
|
||||||
default: ''
|
default: ""
|
||||||
runs:
|
runs:
|
||||||
using: 'docker'
|
using: "docker"
|
||||||
image: 'Dockerfile'
|
image: "Dockerfile"
|
||||||
branding:
|
branding:
|
||||||
color: 'blue'
|
color: "blue"
|
||||||
icon: 'upload-cloud'
|
icon: "upload-cloud"
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh -l
|
#!/bin/sh -l
|
||||||
|
|
||||||
lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -e "set ftp:ssl-force $INPUT_FORCESSL; set ssl:verify-certificate false; mirror $INPUT_OPTIONS --reverse --continue --dereference -x ^\.git/$ $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit"
|
lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -p $INPUT_PORT -e "set ftp:ssl-force $INPUT_FORCESSL; set ssl:verify-certificate false; set ftp:ssl-protect-data true; mirror $INPUT_OPTIONS --reverse --continue --dereference -x ^\.git/$ $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue