mirror of
https://github.com/GenieTim/ftp-action.git
synced 2024-12-05 07:22:25 +08:00
Improve stability options
* Update Dockerfile by removing lefovers * Treat symbolic links as files, Ref: https://lftp.yar.ru/lftp-man.html * Keep in sync with fork source via GitHub Action * Update entrypoint.sh: more stable connections (more retries, longer timeout), only loading newer files (-n), loading symbolic links as files (-L) as well as specifically excluding the git directory (-x ^.git/$) (Co-)authored-by: Tomasz Trębski <kornicameister@gmail.com>
This commit is contained in:
parent
b93ea89a8e
commit
ba35a37f8c
14
.github/workflows/fork.yml
vendored
Normal file
14
.github/workflows/fork.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
name: fork
|
||||||
|
|
||||||
|
"on":
|
||||||
|
schedule:
|
||||||
|
- cron: "*/30 * * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: TG908/fork-sync@v1.1
|
||||||
|
with:
|
||||||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
@ -1,10 +1,11 @@
|
|||||||
FROM alpine:3.11
|
FROM alpine:3.11
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
COPY LICENSE README.md /
|
COPY LICENSE README.md /
|
||||||
|
|
||||||
# RUN apk --no-cache add lftp
|
RUN apk --no-cache add \
|
||||||
RUN apk --no-cache add ncftp
|
lftp=4.8.4-r2
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
#!/bin/sh -l
|
#!/bin/sh -l
|
||||||
|
|
||||||
# lftp $INPUT_HOST -u $INPUT_USER,$INPUT_PASSWORD -e "set ftp:ssl-force $INPUT_FORCESSL; set ssl:verify-certificate false; mirror --reverse --continue --dereference --verbose=3 -P -x ^\.git/$ $INPUT_LOCALDIR $INPUT_REMOTEDIR; quit"
|
lftp ${INPUT_HOST} -u ${INPUT_USER},${INPUT_PASSWORD} -e "
|
||||||
|
set net:timeout 60;
|
||||||
lftp -e "
|
set net:max-retries 20;
|
||||||
set net:timeout 5;
|
set net:reconnect-interval-multiplier 2;
|
||||||
set net:max-retries 3;
|
|
||||||
set net:reconnect-interval-multiplier 1;
|
|
||||||
set net:reconnect-interval-base 5;
|
set net:reconnect-interval-base 5;
|
||||||
set ftp:ssl-force $INPUT_FORCESSL;
|
set ftp:ssl-force $INPUT_FORCESSL;
|
||||||
set sftp:auto-confirm yes;
|
set sftp:auto-confirm yes;
|
||||||
set ssl:verify-certificate $INPUT_FORCESSL;
|
set ssl:verify-certificate $INPUT_FORCESSL;
|
||||||
open $INPUT_HOST
|
mirror -v -P 5 -R -n -L -x ^\.git/$ $INPUT_LOCALDIR $INPUT_REMOTEDIR;
|
||||||
user $INPUT_USER $INPUT_PASSWORD
|
|
||||||
mirror -v -P 5 -R $INPUT_LOCALDIR $INPUT_REMOTEDIR;
|
|
||||||
quit
|
quit
|
||||||
"
|
"
|
||||||
|
Loading…
Reference in New Issue
Block a user