统一 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

+5 -2
View File
@@ -4,6 +4,7 @@ on:
push:
branches:
- main
- codex/desktop-packaging
workflow_dispatch:
permissions:
@@ -51,6 +52,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
type=sha,format=long
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
type=raw,value=alpha,enable=${{ github.ref == 'refs/heads/codex/desktop-packaging' }}
- name: 构建并推送镜像
uses: docker/build-push-action@v7
@@ -61,7 +63,8 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# Dockerfile 中的 Chromium 下载层也由 GitHub Actions 主机缓存。
cache-from: type=gha,scope=ydisks-docker
cache-to: type=gha,mode=max,scope=ydisks-docker
provenance: mode=max
sbom: true