guanghulab/.github/archived-workflows/sync-persona-studio.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

63 lines
2.1 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.

# ═══════════════════════════════════════════════
# 🔺 Sovereign: TCS-0002∞ | Root: SYS-GLW-0001
# 📜 Copyright: 国作登字-2026-A-00037559
# ═══════════════════════════════════════════════
name: 🔄 铸渊跨仓库同步 · persona-studio
on:
push:
branches: [main]
paths:
- 'persona-studio/brain/**'
- 'persona-studio/backend/**'
- 'persona-studio/frontend/**'
workflow_dispatch:
inputs:
sync_target:
description: '同步目标all / brain / frontend / backend'
required: false
default: 'all'
type: choice
options:
- all
- brain
- frontend
- backend
concurrency:
group: sync-persona-studio
cancel-in-progress: true
jobs:
sync:
name: 同步到 persona-studio 仓库
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout guanghulab
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: 执行跨仓库同步
env:
CROSS_REPO_TOKEN: ${{ secrets.ZY_GITHUB_PAT }}
SYNC_TARGET: ${{ github.event.inputs.sync_target || 'all' }}
run: node scripts/cross-repo-sync.js
- name: 通知 persona-studio 仓库
if: env.CROSS_REPO_TOKEN != ''
env:
CROSS_REPO_TOKEN: ${{ secrets.ZY_GITHUB_PAT }}
run: |
curl -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $CROSS_REPO_TOKEN" \
https://api.github.com/repos/qinfendebingshuo/persona-studio/dispatches \
-d '{"event_type":"brain-sync","client_payload":{"source":"guanghulab","timestamp":"'"$(date -u +%Y-%m-%dT%H:%M:%SZ)"'"}}' \
2>/dev/null || echo "⚠️ 跨仓库通知未发送(需要 CROSS_REPO_TOKEN secret"