guanghulab/.github/archived-workflows/bingshuo-deploy-agent.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

82 lines
2.8 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: "🧊 冰朔人格体 · 自动部署诊断"
# === 触发方式 ===
# 1. 手动触发workflow_dispatch
# 2. Issue 评论包含触发关键词
# 3. 新 Issue 带有 bingshuo-deploy 标签
# 4. 合作者推送模块后,模块文档工作流完成时自动触发
on:
workflow_dispatch:
inputs:
action:
description: "执行模式"
required: false
default: "full"
type: choice
options:
- full
- check
- rerun
hours_back:
description: "检查最近多少小时"
required: false
default: "24"
issue_comment:
types: [created]
issues:
types: [opened]
# 合作者推送模块后,模块文档工作流完成时自动触发冰朔人格体部署诊断
workflow_run:
workflows: ["铸渊 · 光湖纪元 模块文档自动生成"]
types: [completed]
permissions:
contents: write
issues: write
actions: write
jobs:
# === 冰朔人格体核心任务 ===
deploy-agent:
runs-on: ubuntu-latest
# 触发条件:
# 1. workflow_dispatch 直接触发
# 2. Issue 评论包含触发关键词(仅限仓库成员)
# 3. 新 Issue 带有 bingshuo-deploy 标签
if: |
github.event_name == 'workflow_dispatch' ||
github.event_name == 'workflow_run' ||
(github.event_name == 'issue_comment' && (
contains(github.event.comment.body, '启动冰朔人格体') ||
contains(github.event.comment.body, '冰朔人格体') ||
contains(github.event.comment.body, '部署诊断') ||
contains(github.event.comment.body, '检查部署')
)) ||
(github.event_name == 'issues' && contains(join(github.event.issue.labels.*.name, ','), 'bingshuo-deploy'))
steps:
- name: 📥 检出代码
uses: actions/checkout@v4
- name: 🟢 配置 Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: 🧊 启动冰朔人格体
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
ISSUE_NUMBER: ${{ github.event.issue.number || '' }}
ISSUE_BODY: ${{ github.event.issue.body || github.event.comment.body || '' }}
DEPLOY_ACTION: ${{ github.event.inputs.action || '' }}
HOURS_BACK: ${{ github.event.inputs.hours_back || '' }}
run: node scripts/bingshuo-deploy-agent.js