telegram-crawler/.github/workflows/make_files_tree.yml

57 lines
1.3 KiB
YAML
Raw Normal View History

2022-04-10 15:28:51 +02:00
name: Fetch new content of tracked links and files
on:
schedule:
- cron: '* * * * *'
push:
# trigger on updated linkbase
branches:
2021-04-24 14:28:06 +02:00
- main
jobs:
2022-04-10 15:28:51 +02:00
fetch_new_content:
name: Make files tree
runs-on: macos-10.15
timeout-minutes: 10
steps:
- name: Clone.
uses: actions/checkout@v2
with:
2021-04-25 18:00:32 +02:00
token: ${{ secrets.PAT }}
- name: Setup Python.
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies.
run: |
pip install -r requirements.txt
- name: Generate files tree.
env:
OUTPUT_FOLDER: "data_ci/"
2022-04-24 13:33:16 +02:00
TELEGRAM_SESSION: ${{ secrets.TELEGRAM_SESSION }}
TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }}
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
run: |
git pull
python make_files_tree.py
- name: Commit and push changes.
run: |
git checkout data
rm -rf data
rm -rf __pycache__
mv data_ci data
git config --global user.email "github-action@users.noreply.github.com"
git config --global user.name "GitHub Action"
git add .
2021-04-24 14:38:39 +02:00
git commit -m "Update content of files"
git push