6940bd05a1
- publish-release.sh: POSIX sh, Entscheidung anhand GITHUB_REF wie publish-images.sh, --tag/--dry-run, Abschnitt per awk, JSON nur per jq --arg, Token nur aus GITEA_TOKEN ueber Header-Datei, GET/tags -> PATCH oder POST, Exit 1 ohne Abschnitt - ci.yml: vierter Schritt im Job publish mit GITEA_TOKEN aus secrets.REGISTRY_TOKEN ueber env - Bewiesen: dry-run v1.0.0 (Body 2227 Zeichen), v9.9.9 Exit 1, main nichts zu tun, API-Basis aus GITHUB_SERVER_URL; Docker-Abbild traegt den Changelog nur im Server-Bundle (1/0); Release Tessera 1.0.0 (id 1) angelegt, zweiter Lauf PATCH, genau ein Release Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018N9CD3ebPKm1b32bPpBknY
75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
# 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.
|
|
# Tag v* (quick-260916-dcz): zusaetzlich Gitea-Release aus dem CHANGELOG.md-Abschnitt (publish-release.sh).
|
|
name: Tessera CI/CD
|
|
|
|
on:
|
|
push:
|
|
branches: [main, live]
|
|
tags: ['v*']
|
|
|
|
jobs:
|
|
quality:
|
|
name: Lint & Type Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Enable pnpm via corepack
|
|
run: corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Lint
|
|
run: pnpm lint
|
|
|
|
- name: Type check
|
|
run: pnpm type-check
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
needs: quality
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Enable pnpm via corepack
|
|
run: corepack enable && corepack prepare pnpm@9.15.0 --activate
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Run tests
|
|
run: pnpm test
|
|
|
|
publish:
|
|
name: Build & Publish Images
|
|
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: Versionsstempel berechnen, Abbilder bauen und veroeffentlichen
|
|
run: sh .gitea/scripts/publish-images.sh
|
|
|
|
- name: Gitea-Release zum Freigabe-Tag anlegen (nur bei Tags v*)
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.REGISTRY_TOKEN }}
|
|
run: sh .gitea/scripts/publish-release.sh
|