Skip to content

Daily Rule Sync And Build #27

Daily Rule Sync And Build

Daily Rule Sync And Build #27

Workflow file for this run

name: Daily Rule Sync & Build
on:
schedule:
- cron: '0 0 * * *' # 每天北京时间 08:00 (UTC 00:00) 运行
workflow_dispatch: # 支持手动触发
jobs:
sync_and_build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Fetch Core Assets
run: python3 scripts/fetch_assets.py
- name: Deduplicate Rule Lists
run: python3 scripts/dedupe_rules.py
- name: Run Smart Build System
run: python3 -u scripts/build_rules.py
- name: Deduplicate Built Rule Lists
run: python3 scripts/dedupe_rules.py
- name: Validate Config And Rule Lists
run: python3 scripts/validate_rules.py
- name: Git Auto Commit & Push
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: daily auto sync & build rules"
file_pattern: 'Rules/Core/*.list Rules/Ruleset/Active/*.list Rules/Ruleset/Active/China/*.list Rules/Ruleset/Active/AdBlock/*.list Rules/Outputs/*.list'