Skip to content

Commit ce7da30

Browse files
Merge pull request #5 from ChrisDoernen/master
Add input parameter to enforce ssl encryption
2 parents 60e94de + 169e275 commit ce7da30

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
host: ${{ secrets.FTP_SERVER }}
2020
user: ${{ secrets.FTP_USERNAME }}
2121
password: ${{ secrets.FTP_PASSWORD }}
22+
forceSsl: true
2223
localDir: "dist"
2324
remoteDir: "www"
2425
```
@@ -30,5 +31,6 @@ Input parameter | Description | Required | Default
3031
host | FTP server name | Yes | N/A
3132
user | FTP username | Yes | N/A
3233
password | FTP password | Yes | N/A
34+
forceSsl | Force SSL encryption | No | false
3335
localDir | The local directory to copy | No | .
3436
remoteDir | The remote directory to copy to | No | .

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ inputs:
1111
password:
1212
description: 'FTP password'
1313
required: true
14+
forceSsl:
15+
description: 'Force SSL encryption'
16+
required: false
17+
default: 'false'
1418
localDir:
1519
description: 'Local directory'
1620
required: false

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh -l
22

3-
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"
3+
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"

0 commit comments

Comments
 (0)