Skip to content

run main.py

run main.py #15

Workflow file for this run

name: run main.py
on:
workflow_dispatch:
inputs:
branch:
description: 'branch name'
required: true
jobs:
watch-ftp-folder:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Watch FTP folder
run: |
HOST="your_ftp_host"
REMOTE_DIR="path_to_watch"
USER=${{ secrets.ACCOUNT_NAME }}
PASS=${{ secrets.KEY_PHRASE }}
docker run --rm -v $(pwd):/workspace atmoz/make lftp -c "open -u $USER,$PASS $HOST; cd $REMOTE_DIR; mirror --reverse --delete --verbose=3 --only-newer . /tmp/ftp-watch"
# Check if any new files were downloaded
if [ "$(ls -A /tmp/ftp-watch)" ]; then
echo "New files detected on FTP server!"
else
echo "No new files detected."
fi