mirror of
https://github.com/soapingtime/diyhrt.git
synced 2026-03-22 23:26:24 +00:00
32 lines
934 B
YAML
32 lines
934 B
YAML
name: Update DIYHRT.cafe links
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "30 23 1 * *" # every 1st of month
|
|
|
|
jobs:
|
|
update:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
token: ${{ secrets.PAT_TOKEN }}
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: pypy-3.7-v7.3.3
|
|
- name: Update links
|
|
if: always()
|
|
run: |
|
|
rm scripts/cafe.txt
|
|
pip install beautifulsoup4 bs4
|
|
python scripts/getlinks.py 'https://diyhrt.cafe/index.php/Special:AllPages' > scripts/cafe.txt
|
|
cd scripts && python formatlinks.py cafe.txt
|
|
- name: Commit changes
|
|
if: ${{ success() }}
|
|
uses: EndBug/add-and-commit@v9
|
|
with:
|
|
add: "scripts/cafe.txt"
|
|
pull: "--rebase --autostash ."
|
|
message: "[automated] update diyhrt.cafe list"
|
|
default_author: github_actions
|