mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-11-22 15:26:43 +01:00
379f979ebe
This reverts commit f0b336ea41
.
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Generate or update list of tracked links
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: '* * * * *'
|
|
push:
|
|
# trigger on updated link crawler rules
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
make_tracked_links_file:
|
|
name: Make tracked links file
|
|
runs-on: macos-12
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
|
|
- name: Clone.
|
|
uses: actions/checkout@v2
|
|
with:
|
|
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/update file with links.
|
|
env:
|
|
OUTPUT_FILENAME: "tracked_links_ci.txt"
|
|
OUTPUT_RESOURCES_FILENAME: "tracked_res_links_ci.txt"
|
|
OUTPUT_TRANSLATIONS_FILENAME: "tracked_tr_links_ci.txt"
|
|
run: |
|
|
python make_tracked_links_list.py
|
|
|
|
- name: Commit and push changes.
|
|
run: |
|
|
git pull
|
|
|
|
mv tracked_links_ci.txt tracked_links.txt
|
|
mv tracked_res_links_ci.txt tracked_res_links.txt
|
|
mv tracked_tr_links_ci.txt tracked_tr_links.txt
|
|
|
|
git config --global user.email "github-action@users.noreply.github.com"
|
|
git config --global user.name "GitHub Action"
|
|
|
|
git add .
|
|
git commit -m "Update tracked links"
|
|
git push
|