initial commit
This commit is contained in:
commit
fcca67b1fb
9
Containerfile
Normal file
9
Containerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM docker.io/alpine:3.19
|
||||
|
||||
RUN apk --no-cache add \
|
||||
lftp \
|
||||
openssh-client
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
22
action.yml
Normal file
22
action.yml
Normal file
@ -0,0 +1,22 @@
|
||||
name: "Sftp Mirror"
|
||||
description: "Mirror a folder to an sftp server."
|
||||
inputs:
|
||||
source:
|
||||
description: "Source directory"
|
||||
required: true
|
||||
destination:
|
||||
description: "Destination directory"
|
||||
default: "/"
|
||||
required: true
|
||||
sftp-user:
|
||||
description: "Sftp user name"
|
||||
required: true
|
||||
sftp-pw:
|
||||
description: "Sftp password"
|
||||
required: true
|
||||
sftp-host:
|
||||
description: "Sftp host"
|
||||
required: true
|
||||
runs:
|
||||
using: "docker"
|
||||
image: "Containerfile"
|
4
entrypoint.sh
Normal file
4
entrypoint.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
lftp -e "set sftp:auto-confirm yes; open -u $INPUT_SFTP_USER,$INPUT_SFTP_PW $SFTP_INPUT_HOST; mirror -v --no-perms --delete --reverse $INPUT_SOURCE $INPUT_DESTINATION; quit"
|
Loading…
Reference in New Issue
Block a user