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

50 lines
1.1 KiB
YAML
Raw Normal View History

2021-04-23 20:39:08 +02:00
name: Generate or update list of tracked links
on:
2021-04-23 22:02:47 +02:00
schedule:
- cron: '0 * * * *'
2021-04-23 20:39:08 +02:00
push:
branches:
- main
jobs:
make_tracked_links_file:
name: Make tracked links file
runs-on: ubuntu-latest
steps:
- name: Clone.
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Python.
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies.
run: |
pip install -r requirements.txt
- name: Generate/update file with links.
2021-04-23 21:47:15 +02:00
env:
OUTPUT_FILENAME: "tracked_links_ci.txt"
2021-04-23 20:39:08 +02:00
run: |
2021-04-23 21:09:24 +02:00
python make_tracked_links_list.py
2021-04-23 20:39:08 +02:00
- name: Commit and push changes.
run: |
2021-04-23 21:33:11 +02:00
git pull
2021-04-23 21:26:04 +02:00
git checkout data
2021-04-23 21:47:15 +02:00
mv tracked_links_ci.txt tracked_links.txt
2021-04-23 21:19:08 +02:00
2021-04-23 21:09:24 +02:00
git config --global user.email "github-action@users.noreply.github.com"
git config --global user.name "GitHub Action"
2021-04-23 21:01:32 +02:00
2021-04-23 21:49:19 +02:00
git add .
2021-04-23 21:05:55 +02:00
git commit -m "Update tracked links"
2021-04-23 20:39:08 +02:00
git push