Compare commits

...

6 commits

Author SHA1 Message Date
hsimah
ca3f8d253d
Feature/add additional opts (#17)
* Update entrypoint.sh

* Update action.yml

* Update README.md

* Update entrypoint.sh

* pass through additional mirror options

* restore meta-data
2021-01-31 20:42:23 +01:00
Sebastian Popp
eb75c5cb29 update readme and license 2020-03-16 10:45:32 +01:00
Sebastian Popp
1204235acf use latest alpine image 2020-03-16 10:01:41 +01:00
Sebastian Popp
ce7da30e09
Merge pull request #5 from ChrisDoernen/master
Add input parameter to enforce ssl encryption
2020-03-16 09:46:50 +01:00
Christian Dörnen
169e275151
Default values should be a string 2020-03-09 20:07:47 +01:00
ChrisDoernen
acf64d3524 Add input parameter to enforce ssl encryption 2020-03-05 21:34:50 +01:00
5 changed files with 16 additions and 5 deletions

View file

@ -1,4 +1,4 @@
FROM alpine:3.10
FROM alpine:3.11
COPY LICENSE README.md /

View file

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 Sebastian Popp
Copyright (c) 2020 Sebastian Popp and contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View file

@ -12,15 +12,16 @@ jobs:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v2
- name: Upload ftp
uses: sebastianpopp/ftp-action@releases/v1
uses: sebastianpopp/ftp-action@releases/v2
with:
host: ${{ secrets.FTP_SERVER }}
user: ${{ secrets.FTP_USERNAME }}
password: ${{ secrets.FTP_PASSWORD }}
localDir: "dist"
remoteDir: "www"
options: "--delete --asci"
```
## Input parameters
@ -32,3 +33,5 @@ user | FTP username | Yes | N/A
password | FTP password | Yes | N/A
localDir | The local directory to copy | No | .
remoteDir | The remote directory to copy to | No | .
forceSsl | Force SSL encryption | No | false
options | Mirror command options | No | ''

View file

@ -11,6 +11,10 @@ inputs:
password:
description: 'FTP password'
required: true
forceSsl:
description: 'Force SSL encryption'
required: false
default: 'false'
localDir:
description: 'Local directory'
required: false
@ -19,6 +23,10 @@ inputs:
description: 'Remote directory'
required: false
default: '.'
options:
description: 'Additional mirror command options'
required: false
default: ''
runs:
using: 'docker'
image: 'Dockerfile'

View file

@ -1,3 +1,3 @@
#!/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 $INPUT_OPTIONS --reverse --continue --dereference -x ^\.git/$ $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit"