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:
|
2021-04-23 22:02:47 +02:00
|
|
|
schedule:
|
2022-05-13 12:49:33 +02:00
|
|
|
- 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
|
2022-07-28 01:17:48 +02:00
|
|
|
runs-on: macos-12
|
2022-05-10 20:32:58 +02:00
|
|
|
timeout-minutes: 5
|
2021-04-23 20:39:08 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
|
|
- name: Clone.
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
2021-04-25 18:00:32 +02:00
|
|
|
token: ${{ secrets.PAT }}
|
2021-04-23 20:39:08 +02:00
|
|
|
|
|
|
|
- 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"
|
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
|