ci: package and push the Helm chart to the OCI registry
CI / test (push) Successful in 1m42s
CI / chart (push) Successful in 2s
CI / chart-push (push) Successful in 3s
CI / image (push) Successful in 3m4s

Add a chart-push job that runs after the chart lint on every push and
publishes the packaged chart to oci://gitea.tap-tap.win/taptap/charts.

Main builds use <chart version>-sha.<commit> so parallel commits do not
overwrite each other; v* tags use the tag version. The shared
scripts/push-chart.sh also supports explicit VERSION and local use.
This commit is contained in:
TapTap committed 2026-11-14 09:21:46 +00:00
1 parent 441fa056ba
commit 76bccaefea
4 files changed
+139 -2

No files matched your search

+43 -2
View File
@@ -179,7 +179,7 @@ Build a lightweight, self-hosted **OpenSubsonic-compatible music server** in **K
- **Transcoding:** `ffmpeg` binary in the runtime image (libmp3lame), invoked as a subprocess
- **Logging:** `logback-classic` + `kotlin-logging-jvm`
- **Config:** YAML (`library.yaml`, `users.yaml`) with env-var overrides for paths and secrets
- **Deployment:** multi-stage Dockerfile, Helm chart for k3s, Gitea Actions for tests, local release script for image pushes
- **Deployment:** multi-stage Dockerfile, Helm chart for k3s, Gitea Actions for tests and artifact publishing, local release script for image pushes
---
@@ -704,7 +704,48 @@ UID 10001 (the chart sets `fsGroup: 10001`).
The server exits at startup if a configured root path is missing or unreadable, so
the pod will not pass its readiness probe in that case.
### 9.3 Operations
### 9.3 Chart registry
CI packages the chart and pushes it to the Gitea OCI registry after the `chart`
job passes. The package is available at:
```text
oci://gitea.tap-tap.win/taptap/charts/musicmanager
```
Versions published by CI:
- `main`: `<chart version>-sha.<commit>`, for example `0.1.1-sha.441fa05`
- `v*` tag: the tag without the leading `v`, for example `v0.2.0` -> `0.2.0`
The registry is private, and Helm keeps its own credentials (a Docker login is
not enough):
```bash
helm registry login gitea.tap-tap.win -u TapTap
```
Install a published chart:
```bash
helm upgrade --install musicmanager \
oci://gitea.tap-tap.win/taptap/charts/musicmanager \
--version 0.1.1-sha.441fa05 \
--namespace musicmanager \
--set users.existingSecret=musicmanager-users \
--set imagePullSecrets[0].name=musicmanager-registry
```
To package and push from a workstation, run `helm registry login` first and then:
```bash
scripts/push-chart.sh # version from CI env, git, or Chart.yaml
VERSION=0.2.0 scripts/push-chart.sh # explicit version
```
The script writes the `.tgz` to `dist/`, which is ignored by git.
### 9.4 Operations
- Backups: documented manual copy of `DATA_DIR` (SQLite DB + covers) while the server is stopped, or via `sqlite3 .backup`.
- Logs to stdout (JSON optional), picked up by the cluster.