Add release Docker image workflow
pytest / test (push) Successful in 42s
docker-image / build-and-push (push) Successful in 3m42s

This commit is contained in:
2026-04-20 22:18:54 +02:00
parent e9e2034d30
commit 7978a7e1e1
2 changed files with 65 additions and 16 deletions
+26 -16
View File
@@ -229,6 +229,32 @@ docker compose up -d --build
docker compose logs -f app
```
## Container Image CI
项目提供了一个 release image workflow
- workflow 文件:`.github/workflows/docker-image.yml`
- 触发条件:push 匹配 `v*` 的 tag,例如 `v1.0.0`
- registry`code.wanderingbadger.dev`
- image`code.wanderingbadger.dev/tliu93/home-automation`
这个 workflow 会构建并推送 multi-arch image
- `linux/amd64`
- `linux/arm64`
推送的 tag
- release tag 本身,例如 `v1.0.0`
- `latest`
workflow 依赖以下 secrets
- `REGISTRY_USERNAME`
- `REGISTRY_TOKEN`
CI 产出的 image 是给部署机直接 `docker pull` 使用的。部署机不需要 checkout 本仓库,也不需要本地执行 `docker build`
## 运行测试
```bash
@@ -278,19 +304,3 @@ SQLite 持久化目录:
- 本地 `./data`
- 容器内 `/app/data`
## 后续迁移建议
后续可以在当前骨架上继续迁移这些模块:
- TickTick integration
- Home Assistant integration
- poo records
建议继续参考:
- [当前系统盘点](docs/current-system-inventory.md)
- [Python 重构方案](docs/python-rewrite-plan.md)
- [迁移风险清单](docs/migration-risks.md)
- [Location Recorder 接管说明](docs/location-recorder.md)
- [基础鉴权说明](docs/auth.md)