mirror of
https://github.com/sebastianpopp/ftp-action.git
synced 2025-12-05 03:34:50 +01:00
Compare commits
15 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca3f8d253d | ||
|
|
eb75c5cb29 | ||
|
|
1204235acf | ||
|
|
ce7da30e09 | ||
|
|
169e275151 | ||
|
|
acf64d3524 | ||
|
|
60e94deadd | ||
|
|
73cab2a2cd | ||
|
|
5b5c1425a2 | ||
|
|
098896f8ae | ||
|
|
49423c5463 | ||
|
|
890fde3763 | ||
|
|
0dcdfc242f | ||
|
|
e46bbab164 | ||
|
|
12afc55717 |
5 changed files with 30 additions and 23 deletions
|
|
@ -1,11 +1,9 @@
|
|||
FROM alpine:3.10
|
||||
FROM alpine:3.11
|
||||
|
||||
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>"
|
||||
COPY LICENSE README.md /
|
||||
|
||||
RUN apk --no-cache add lftp
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
|
|||
2
LICENSE
2
LICENSE
|
|
@ -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
|
||||
|
|
|
|||
19
README.md
19
README.md
|
|
@ -1,26 +1,27 @@
|
|||
# ftp-action
|
||||
|
||||
Automate copying your files via FTP using this GitHub action.
|
||||
Automate copying your files via ftp using this GitHub action.
|
||||
|
||||
## Example usage
|
||||
|
||||
```
|
||||
name: Upload via FTP
|
||||
name: Deploy via ftp
|
||||
on: push
|
||||
jobs:
|
||||
FTP-Action:
|
||||
name: FTP-Action
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Deploy FTP
|
||||
uses: sebastianpopp/ftp-action@master
|
||||
- uses: actions/checkout@v2
|
||||
- name: Upload ftp
|
||||
uses: sebastianpopp/ftp-action@releases/v2
|
||||
with:
|
||||
host: "ftp.example.com"
|
||||
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 | ''
|
||||
|
|
|
|||
18
action.yml
18
action.yml
|
|
@ -1,6 +1,6 @@
|
|||
name: 'FTP Action'
|
||||
description: 'Mirrors a directory with a FTP server.'
|
||||
name: 'ftp-action'
|
||||
author: 'Sebastian Popp <ftp-action@sebastianpopp.com>'
|
||||
description: 'Automate copying your files via FTP using this GitHub action.'
|
||||
inputs:
|
||||
host:
|
||||
description: 'FTP host'
|
||||
|
|
@ -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,9 +23,13 @@ inputs:
|
|||
description: 'Remote directory'
|
||||
required: false
|
||||
default: '.'
|
||||
branding:
|
||||
color: 'blue'
|
||||
icon: 'upload'
|
||||
options:
|
||||
description: 'Additional mirror command options'
|
||||
required: false
|
||||
default: ''
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
branding:
|
||||
color: 'blue'
|
||||
icon: 'upload-cloud'
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh -l
|
||||
|
||||
set -e
|
||||
|
||||
lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -e "set ssl:verify-certificate false; mirror -R $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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue