mirror of
https://github.com/hotyue/IP-Sentinel.git
synced 2026-05-10 17:52:41 +08:00
feat(scripts): 引入 v3.6.4 活体新闻融合引擎,重构 Action 流水线实现冷热数据合并原子提交
This commit is contained in:
21
.github/workflows/daily_keywords.yml
vendored
21
.github/workflows/daily_keywords.yml
vendored
@@ -1,8 +1,8 @@
|
||||
name: Daily Trends Factory
|
||||
name: Daily Data Factory
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# 每天 UTC 18:00 运行 (北京时间凌晨 02:00)
|
||||
# 每天 UTC 18:00 (北京时间凌晨 02:00) 执行,赶在节点凌晨3点更新前造好子弹
|
||||
- cron: '0 18 * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
@@ -10,7 +10,7 @@ permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
update-trends:
|
||||
update-data:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
@@ -23,15 +23,20 @@ jobs:
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Execute Trends Engine
|
||||
- name: Execute Trends Engine (搜索词库)
|
||||
run: python scripts/fetch_trends.py
|
||||
|
||||
- name: Commit and Push
|
||||
- name: Execute Trust URL Engine (活体新闻流融合)
|
||||
run: python scripts/fetch_trust_urls.py
|
||||
|
||||
- name: Commit and Push All Data
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
# 一揽子添加搜索词库和地区白名单的变化
|
||||
git add data/keywords/
|
||||
git add data/regions/
|
||||
|
||||
# 防御机制:如果没有新数据,就静默退出,不产生空提交
|
||||
if git diff --staged --quiet; then
|
||||
@@ -39,6 +44,6 @@ jobs:
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# 策略:放弃危险的 amend 强制覆盖,采用带日期的标准安全提交
|
||||
git commit -m "chore(data): 🤖 自动机兵:刷新全战区热点词库 [$(date +'%Y-%m-%d')]"
|
||||
git push origin main
|
||||
# 策略:将两路数据的更新合并为一个原子提交
|
||||
git commit -m "chore(data): 🤖 自动机兵:同步全战区热点词库与活体新闻流 [$(date +'%Y-%m-%d')]"
|
||||
git push origin main
|
||||
|
||||
Reference in New Issue
Block a user