dev-manager-tauri/.blueprint/modules/cicd-workflow.md
lanrtop ed2b95b90d
All checks were successful
Push & PR Check / check (push) Successful in 55s
chore(blueprint): dsh-takeover T1/T2 收官——记忆回流 AGENTS/cicd-workflow + CI 校验验收留痕
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-09-11 21:28:39 +09:00

60 lines
2.8 KiB
Markdown
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.

---
id: cicd-workflow
name: CI/CD 工作流
status: done
progress: 100
---
## 概述
CI/CD 配置管理和 GitHub Actions Workflow 文件生成。支持两种部署类型Web SSH 部署和 Tauri OSS 分发。
完整部署教程见 docs/tauri-cicd-guide.md。
> ✅ **改造完成2026-07-02**generate_workflow 已产出 Gitea Actions 模板(.gitea/workflows/
> 炼境自身发版链路经本机 act_runner 实测跑通v0.1.16 上线 OSS见 gitea-integration R0 复盘)。
> 「Actions 运行历史」待 PR/CI 事件联动落地后按 Gitea 事实源重建concept 卡在 gitea-integration
## 本机 CI runner 速查2026-09-11 自 Claude 私有记忆回流CI 排障先读这里)
- 拓扑:公网 Gitea + 内网本机 runner出站拉任务无需入站
- 安装位置:`C:\Users\yangzhixiang\act_runner\`act_runner.exe v0.2.13 + config.yaml + .runner + runner.log
- 注册身份:`lianjing-win`,标签 `windows:host`host 模式,直接用本机工具链)
- 关键配置config.yaml`docker_host: "-"` + `labels: ["windows:host"]`——默认生成的 docker labels 会导致 daemon 拒启
- 启动:`act_runner.exe daemon -c config.yaml`;开机自启靠启动文件夹 `act_runner.vbs`(隐藏窗口,日志追加 runner.log
- 排障:日志级别 trace 时 step 输出全落 runner.log可直接定位构建失败工作目录 `C:/Users/yangzhixiang/act_runner/work`
- **Gitea 1.22.6 无 `/actions/runs` REST API**:查 CI 结果用 `GET /repos/{o}/{r}/commits/{sha}/statuses`;迁移创建的仓库默认关 Actions 单元(`PATCH /repos/{o}/{r} {"has_actions":true}` 开启)
- 签名密钥:`~/.tauri/dev-manager-tauri.key`2026-07-02 换钥,旧钥 .old-locked 备份),密码双写 Gitea Secrets + 炼境密钥凭据库(密钥类 secret 单一存储 = 定时炸弹)
## 任务卡
### ✅ CI/CD 配置 CRUD
- status: done
- files: src-tauri/src/commands/cicd.rs, src/components/dashboard/CicdModal.tsx
保存和读取 CI/CD 配置(部署类型、触发分支、构建命令等)。
### ✅ Workflow 文件生成
- status: done
- files: src-tauri/src/commands/cicd.rs
根据配置自动生成 .github/workflows/ 下的 YAML 文件。
### ✅ Web SSH 部署模板
- status: done
- files: src-tauri/src/commands/cicd.rs
生成基于 appleboy/ssh-action 的部署 workflow。
### ✅ Tauri OSS 分发模板
- status: done
- files: src-tauri/src/commands/cicd.rs
生成 Tauri 构建 + 签名 + 阿里云 OSS 上传的 release workflow。
### ✅ Actions 运行历史
- status: done
- files: src/components/dashboard/CicdModal.tsx
查看 GitHub Actions 运行状态,支持手动触发。
> ⚠️ 已随 github-decommission2026-07-02移除仅作历史记录Gitea Actions 接入后按新事实源重建。