add action
This commit is contained in:
parent
37f3dddf43
commit
83bf24a942
|
@ -0,0 +1,11 @@
|
|||
FROM alpine:3.10
|
||||
|
||||
LABEL version="1.0.0"
|
||||
LABEL repository="https://github.com/sebastianpopp/ftp-action"
|
||||
LABEL homepage="https://github.com/sebastianpopp/ftp-action"
|
||||
LABEL maintainer="Sebastian Popp <ftp-action@sebastianpopp.com>"
|
||||
|
||||
RUN apk --no-cache add lftp
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
|
@ -0,0 +1,27 @@
|
|||
name: 'FTP Action'
|
||||
description: 'Mirrors a directory with a FTP server.'
|
||||
author: 'Sebastian Popp <ftp-action@sebastianpopp.com>'
|
||||
inputs:
|
||||
host:
|
||||
description: 'FTP host'
|
||||
required: true
|
||||
user:
|
||||
description: 'FTP user'
|
||||
required: true
|
||||
password:
|
||||
description: 'FTP password'
|
||||
required: true
|
||||
localDir:
|
||||
description: 'Local directory'
|
||||
required: false
|
||||
default: '.'
|
||||
remoteDir:
|
||||
description: 'Remote directory'
|
||||
required: false
|
||||
default: '.'
|
||||
branding:
|
||||
color: 'blue'
|
||||
icon: 'upload'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -e "set ssl:verify-certificate false; mirror -R $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit"
|
Loading…
Reference in New Issue