feat(build): 全面优化打包流程,Docker 镜像自动发布到 GHCR

Docker 优化:
- Dockerfile 层缓存(requirements/lockfile 先复制再安装)
- ARG 可配置镜像源,国际用户可覆盖为默认源
- 前端 Dockerfile 改用 corepack + frozen-lockfile
- 精简 .dockerignore,排除 .git 和 Tauri 构建产物

CI/CD 优化:
- docker-build 自动推送到 GHCR,支持 amd64/arm64 双架构
- 桌面端 CI 增加 pip/pnpm/cargo 缓存,升级 actions 版本
- Python 版本对齐为 3.11,增加 Linux 构建矩阵
- build.sh 加 -y 覆盖标志

文档更新:
- README Docker 部署简化为 docker pull + docker run

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
huangjianwu
2026-03-23 17:48:34 +08:00
parent 5861ef4168
commit f6a3438079
11 changed files with 220 additions and 413 deletions

View File

@@ -25,6 +25,7 @@ cp .env.example backend/.env
# 步骤 2: PyInstaller 打包,直接添加已存在的 .env 文件
echo "开始 PyInstaller 打包..."
pyinstaller \
-y \
--name BiliNoteBackend \
--paths backend \
--distpath ./BillNote_frontend/src-tauri/bin \