ci(quick-260914-ku1): zwei Kanaele — main -> beta+latest, Tag v* -> live+vX.Y.Z, Versionsstempel als Build-Args in beide Dockerfiles, IMAGE_TAG in docker-compose.prod.yml

- Dockerfiles: globale ARG APP_VERSION/APP_CHANNEL/APP_COMMIT/APP_BUILD_TIME (Vorgabe dev),
  web-builder setzt NEXT_PUBLIC_APP_* vor pnpm build (Bauzeit-Einbettung), runner-Stufen
  setzen ENV APP_* fuer die Laufzeit
- .gitea/scripts/publish-images.sh: Kanal und Etiketten allein aus GITHUB_REF, --print-plan
  ohne Docker, Zweig live ohne Tag = nichts zu tun (T-KU1-07)
- ci.yml: Trigger main, live und Tags v*; publish mit fetch-depth: 0 und Skriptaufruf
- docker-compose.prod.yml: image ...:${IMAGE_TAG:-beta} fuer web und api
- Falsifizierung lokal: mit Build-Args v9.9.9-test in API-Env, dist-Zeile und Web-Bundle
  (1 Datei), ohne Build-Args dev/dev und 0 Treffer im Bundle

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018N9CD3ebPKm1b32bPpBknY
This commit is contained in:
2026-09-14 15:42:01 +02:00
parent cdb571c509
commit 9731501718
5 changed files with 115 additions and 13 deletions
+10 -11
View File
@@ -1,8 +1,12 @@
# Kanalmodell (quick-260914-ku1): main -> Kanal beta (Etiketten beta + latest);
# Tag v* -> Kanal live (Etiketten live + vX.Y.Z); Zweig live ohne Tag wird nur geprueft.
# Die Entscheidung trifft .gitea/scripts/publish-images.sh anhand GITHUB_REF.
name: Tessera CI/CD
on:
push:
branches: [main]
branches: [main, live]
tags: ['v*']
jobs:
quality:
@@ -52,18 +56,13 @@ jobs:
runs-on: ubuntu-latest
needs: test
steps:
# Ohne volle Historie und Tags liefert `git describe` nichts -- Pflicht fuer den Stempel.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Log in to Gitea Container Registry
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login localhost:3002 -u ${{ gitea.actor }} --password-stdin
- name: Build web image
run: docker build -t localhost:3002/schalli/tessera-ctl/web:latest -f apps/web/Dockerfile .
- name: Build api image
run: docker build -t localhost:3002/schalli/tessera-ctl/api:latest -f apps/api/Dockerfile .
- name: Push images
run: |
docker push localhost:3002/schalli/tessera-ctl/web:latest
docker push localhost:3002/schalli/tessera-ctl/api:latest
- name: Versionsstempel berechnen, Abbilder bauen und veroeffentlichen
run: sh .gitea/scripts/publish-images.sh