统一 Chromium 构建与发布流程

统一独立安装包与 Docker 镜像的 Playwright Chromium 来源,固定使用 go.mod 对应的 Playwright 版本,避免依赖 Debian 仓库中的 chromium 包。

- Docker 多架构构建阶段按 debian13 目标架构下载 Chromium,并通过 Playwright 安装系统运行库。

- Linux、Windows、macOS 安装包在 GitHub Actions 构建阶段预下载并打包对应架构的 driver 与 Chromium。

- 为 Linux、Windows、macOS runtime 增加 GitHub Actions 缓存,缓存键绑定依赖和下载程序版本。

- Linux 安装过程改为复制内置 runtime,仅安装系统依赖,不再安装时下载浏览器。

- 修复使用外部 Node.js 时 Playwright runtime 的就绪检测,并补充相关测试。

- codex/desktop-packaging 分支启用 Docker CI,发布 alpha 标签,不覆盖 latest。

- 同步更新 Docker Compose 配置和部署文档。
This commit is contained in:
Christ committed 2026-08-12 17:35:45 +08:00
1 parent 6032dfed0f
commit 94f4e070f6
11 files changed
+175 -54

No files matched your search

+10 -2
View File
@@ -14,7 +14,11 @@ func main() {
driverDir := flag.String("driver-dir", "", "Playwright driver directory")
browserDir := flag.String("browser-dir", "", "Playwright browser cache directory")
withDeps := flag.Bool("with-deps", false, "also install Linux system dependencies")
depsOnly := flag.Bool("deps-only", false, "only install Linux system dependencies; do not download Chromium")
flag.Parse()
if *depsOnly && !*withDeps {
*withDeps = true
}
if *driverDir != "" {
if err := os.Setenv("PLAYWRIGHT_DRIVER_PATH", *driverDir); err != nil {
@@ -43,10 +47,14 @@ func main() {
}
args := []string{"install"}
if *withDeps {
if *depsOnly {
args = []string{"install-deps", "chromium"}
} else if *withDeps {
args = append(args, "--with-deps")
args = append(args, "chromium")
} else {
args = append(args, "chromium")
}
args = append(args, "chromium")
cmd := driver.Command(args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr