zhizhi/.github/workflows/notion-connectivity-test.yml

54 lines
1.7 KiB
YAML
Raw 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.

name: 铸渊 · Notion 连通性测试
# YM-TEST-20260307-001 · 铸渊→Notion 数据桥连通性测试
#
# 三项测试:
# 1. 写入「📡 跨平台信号日志」SIGNAL_LOG_DB_ID
# 2. 写入「📋 GitHub 变更日志」CHANGES_DB_ID有默认值
# 3. 写入「📥 GitHub SYSLOG 收件箱」SYSLOG_DB_ID有默认值
#
# 依赖 Secrets
# NOTION_TOKEN Notion Integration Token
#
# 可选 Secrets / Variables
# SIGNAL_LOG_DB_ID 信号日志 database_idSecrets 或 Variables
# CHANGES_DB_ID 变更日志 database_id有默认值可覆盖
# SYSLOG_DB_ID SYSLOG 收件箱 database_id有默认值可覆盖
on:
workflow_dispatch:
jobs:
connectivity-test:
name: 🧪 Notion 连通性测试
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 🧪 执行连通性测试
id: test
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
SIGNAL_LOG_DB_ID: ${{ vars.SIGNAL_LOG_DB_ID }}
CHANGES_DB_ID: ${{ secrets.CHANGES_DB_ID }}
SYSLOG_DB_ID: ${{ secrets.SYSLOG_DB_ID }}
run: node scripts/notion-connectivity-test.js
- name: 提交信号日志
if: always()
run: |
git config user.name "铸渊 (ZhùYuān)"
git config user.email "zhuyuan@guanghulab.com"
git add signal-log/
git diff --cached --quiet || git commit -m "🧪 连通性测试信号日志 · YM-TEST-20260307-001"
git push || true