forked from WuSuoV/verifyBookSource
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.04 KB
/
source-update.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: BookSource Update
on:
schedule:
- cron: '0 0 */4 * *' # 每四天午夜运行
workflow_dispatch:
jobs:
run-script:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run script
env:
BOOK_SOURCE_PATH: 'http://mirror.ghproxy.com/https://raw.githubusercontent.com/shidahuilang/shuyuan/shuyuan/good.json'
OUTPUT_PATH: './output/'
WORKERS: '64'
DEDUP: 'true'
FILTER: 'false'
KEYWORDS_TO_FILTER: ''
run: python app.py
- name: Commit and push if changed
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add .
git commit -m "Update book sources" -a || exit 0
git push