2021-04-23 20:39:08 +02:00
|
|
|
name: Generate or update list of tracked links
|
|
|
|
|
|
|
|
on:
|
2022-06-09 14:02:22 +02:00
|
|
|
workflow_dispatch:
|
2022-11-03 19:32:50 +01:00
|
|
|
schedule:
|
|
|
|
- cron: '* * * * *'
|
2021-05-01 15:16:58 +02:00
|
|
|
push:
|
|
|
|
# trigger on updated link crawler rules
|
|
|
|
branches:
|
|
|
|
- main
|
2021-04-23 20:39:08 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
make_tracked_links_file:
|
|
|
|
name: Make tracked links file
|
2024-06-02 14:23:36 +02:00
|
|
|
runs-on: ubuntu-20.04
|
2022-05-10 20:32:58 +02:00
|
|
|
timeout-minutes: 5
|
2021-04-23 20:39:08 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Clone.
|
2024-06-02 16:05:39 +02:00
|
|
|
uses: actions/checkout@v4
|
2021-04-23 20:39:08 +02:00
|
|
|
with:
|
2021-04-25 18:00:32 +02:00
|
|
|
token: ${{ secrets.PAT }}
|
2021-04-23 20:39:08 +02:00
|
|
|
|
|
|
|
- name: Setup Python.
|
2024-06-02 16:05:39 +02:00
|
|
|
uses: actions/setup-python@v5
|
2021-04-23 20:39:08 +02:00
|
|
|
with:
|
2024-06-02 16:05:39 +02:00
|
|
|
python-version: 3.12
|
2021-04-23 20:39:08 +02:00
|
|
|
|
|
|
|
- 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"
|
2022-06-18 17:36:39 +02:00
|
|
|
OUTPUT_RESOURCES_FILENAME: "tracked_res_links_ci.txt"
|
|
|
|
OUTPUT_TRANSLATIONS_FILENAME: "tracked_tr_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:47:15 +02:00
|
|
|
|
|
|
|
mv tracked_links_ci.txt tracked_links.txt
|
2022-06-18 17:36:39 +02:00
|
|
|
mv tracked_res_links_ci.txt tracked_res_links.txt
|
|
|
|
mv tracked_tr_links_ci.txt tracked_tr_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
|