guanghulab/.github/archived-workflows/notion-heartbeat.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

52 lines
1.7 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ═══════════════════════════════════════════════
# 🔺 Sovereign: TCS-0002∞ | Root: SYS-GLW-0001
# 📜 Copyright: 国作登字-2026-A-00037559
# ═══════════════════════════════════════════════
name: Notion Heartbeat Monitor
# 💓 Phase B3 · 工单心跳监控
#
# 每 5 分钟检测 Notion 工单队列中的待处理工单:
# - 超过 5 分钟未回执 → 重新触发人格体唤醒(最多 3 次)
# - 3 次重试仍无回执 → 标记工单异常 + 发邮件通知冰朔
#
# 依赖 Secrets
# NOTION_API_TOKEN Notion API token
# NOTION_TICKET_DB_ID 工单队列数据库 ID
# SMTP_USER 邮件发送者
# SMTP_PASS 邮件授权码
on:
schedule:
- cron: '*/5 * * * *'
workflow_dispatch:
jobs:
heartbeat:
name: 💓 工单心跳检测
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci --ignore-scripts
- name: 💓 执行心跳检测
env:
NOTION_TOKEN: ${{ secrets.NOTION_API_KEY }}
NOTION_TICKET_DB_ID: ${{ secrets.NOTION_TICKET_DB_ID }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SMTP_USER: ${{ secrets.SMTP_USER }}
SMTP_PASS: ${{ secrets.SMTP_PASS }}
ALERT_EMAIL: '<<@committer_handle:base64>>'
run: node scripts/notion-heartbeat.js