mirror of
https://github.com/GenieTim/ftp-action.git
synced 2024-12-05 07:22:25 +08:00
add action
This commit is contained in:
parent
37f3dddf43
commit
83bf24a942
11
Dockerfile
Normal file
11
Dockerfile
Normal file
@ -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"]
|
27
action.yml
Normal file
27
action.yml
Normal file
@ -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'
|
5
entrypoint.sh
Executable file
5
entrypoint.sh
Executable file
@ -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
Block a user