mirror of
https://github.com/GenieTim/ftp-action.git
synced 2024-12-05 07:22:25 +08:00
Merge pull request #5 from ChrisDoernen/master
Add input parameter to enforce ssl encryption
This commit is contained in:
commit
ce7da30e09
@ -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 }}
|
||||||
|
forceSsl: true
|
||||||
localDir: "dist"
|
localDir: "dist"
|
||||||
remoteDir: "www"
|
remoteDir: "www"
|
||||||
```
|
```
|
||||||
@ -30,5 +31,6 @@ 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
|
||||||
|
forceSsl | Force SSL encryption | No | false
|
||||||
localDir | The local directory to copy | No | .
|
localDir | The local directory to copy | No | .
|
||||||
remoteDir | The remote directory to copy to | No | .
|
remoteDir | The remote directory to copy to | No | .
|
||||||
|
@ -11,6 +11,10 @@ inputs:
|
|||||||
password:
|
password:
|
||||||
description: 'FTP password'
|
description: 'FTP password'
|
||||||
required: true
|
required: true
|
||||||
|
forceSsl:
|
||||||
|
description: 'Force SSL encryption'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
localDir:
|
localDir:
|
||||||
description: 'Local directory'
|
description: 'Local directory'
|
||||||
required: false
|
required: false
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh -l
|
#!/bin/sh -l
|
||||||
|
|
||||||
lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -e "set ssl:verify-certificate false; mirror --reverse --continue --dereference -x ^\.git/$ $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit"
|
lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -e "set ftp:ssl-force $INPUT_FORCESSL; set ssl:verify-certificate false; mirror --reverse --continue --dereference -x ^\.git/$ $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit"
|
||||||
|
Loading…
Reference in New Issue
Block a user