guanghulab/.github/archived-workflows/sync-notion-profiles.yml
Guanghu Domestic Migration d1e47f4565
Some checks are pending
自动更新代码和重启 / update-and-restart (push) Waiting to run
CI检查 + 自动部署 / check (push) Waiting to run
CI检查 + 自动部署 / deploy (push) Blocked by required conditions
重启聊天服务 / restart (push) Waiting to run
chore: import sanitized domestic snapshot for REPO-002
Source snapshot: ca48d3ddf926d79aa138306164169baf764bb829
2026-07-17 15:54:41 +08:00

50 lines
1.6 KiB
YAML

# ═══════════════════════════════════════════════
# 🔺 Sovereign: TCS-0002∞ | Root: SYS-GLW-0001
# 📜 Copyright: 国作登字-2026-A-00037559
# ═══════════════════════════════════════════════
name: "📡 同步 Notion 开发者画像"
on:
schedule:
- cron: '0 */6 * * *' # 每6小时同步一次
workflow_dispatch: # 手动触发
repository_dispatch:
types: [notion-sync] # 霜砚/铸渊可主动触发
permissions:
contents: write
jobs:
sync-profiles:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Sync Notion Data
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_CONTROL_PANEL_DB_ID: ${{ secrets.NOTION_CONTROL_PANEL_DB_ID }}
NOTION_SYSLOG_DB_ID: ${{ secrets.NOTION_SYSLOG_DB_ID }}
run: |
node scripts/sync-notion-profiles.js
- name: Commit & Push
run: |
git config user.name "铸渊 (ZhùYuān)"
git config user.email "zhuyuan@guanghulab.com"
git add .github/notion-cache/
if git diff --cached --quiet; then
echo "📡 Notion 画像无变更,跳过提交"
exit 0
fi
git commit -m "📡 同步 Notion 开发者画像 · $(TZ='Asia/Shanghai' date '+%Y-%m-%d %H:%M')"
git push origin main