Skip to content

Commit 83bf24a

Browse files
committed
add action
1 parent 37f3ddd commit 83bf24a

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM alpine:3.10
2+
3+
LABEL version="1.0.0"
4+
LABEL repository="https://github.com/sebastianpopp/ftp-action"
5+
LABEL homepage="https://github.com/sebastianpopp/ftp-action"
6+
LABEL maintainer="Sebastian Popp <[email protected]>"
7+
8+
RUN apk --no-cache add lftp
9+
10+
COPY entrypoint.sh /entrypoint.sh
11+
ENTRYPOINT ["/entrypoint.sh"]

action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: 'FTP Action'
2+
description: 'Mirrors a directory with a FTP server.'
3+
author: 'Sebastian Popp <[email protected]>'
4+
inputs:
5+
host:
6+
description: 'FTP host'
7+
required: true
8+
user:
9+
description: 'FTP user'
10+
required: true
11+
password:
12+
description: 'FTP password'
13+
required: true
14+
localDir:
15+
description: 'Local directory'
16+
required: false
17+
default: '.'
18+
remoteDir:
19+
description: 'Remote directory'
20+
required: false
21+
default: '.'
22+
branding:
23+
color: 'blue'
24+
icon: 'upload'
25+
runs:
26+
using: 'docker'
27+
image: 'Dockerfile'

entrypoint.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
3+
set -e
4+
5+
lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -e "set ssl:verify-certificate false; mirror -R $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit"

0 commit comments

Comments
 (0)