Skip to content

Validate Sources

Validate Sources #1

Workflow file for this run

name: Validate Sources
on:
schedule:
- cron: '0 2 * * 0' # 每周日凌晨2点 UTC
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: pip install aiohttp
- name: Run validation
run: |
python scripts/validate.py \
--input sources/legado/full.json \
--output sources/legado/valid.json \
--invalid sources/legado/invalid.json \
--report validation_report.json
- name: Update sources
run: |
if [ -f sources/legado/valid.json ]; then
mv sources/legado/valid.json sources/legado/full.json
fi
- name: Commit changes
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --staged --quiet || git commit -m "chore: update source validation results"
git push