feat(18-02): Task 1 — Job desktop (Linux-AppImage) und Uebergabe an publish per actions/cache

- Neuer CI-Job desktop nach test, laeuft auf main und bei Tags v* (Systemabhaengigkeiten,
  Rust-Toolchain per rustup, Cargo-Zwischenspeicher, Version setzen, cargo check/clippy,
  alte Bundles entfernen, Linux-AppImage bauen, desktop-collect.sh --require linux,
  Uebergabe per actions/cache/save mit Schluessel desktop-dist-${{ gitea.sha }})
- publish haengt jetzt an desktop (needs: desktop) statt an test, holt die Pakete per
  actions/cache/restore mit fail-on-cache-miss: true und prueft das Manifest hart
- publish-images.sh bricht im echten Baupfad ohne desktop-dist/manifest.json ab
  (zweites Netz gegen einen Cache-Fehlschlag, D-08/Pitfall 1)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-16 16:21:09 +02:00
parent cd62de1d38
commit a6ffe05150
2 changed files with 95 additions and 1 deletions
+11
View File
@@ -19,6 +19,12 @@
# die volle Historie samt Tags (fetch-depth: 0 im Workflow). # die volle Historie samt Tags (fetch-depth: 0 im Workflow).
# #
# Dieses Skript kennt kein Secret und gibt keines aus; der Registry-Login bleibt im Workflow. # Dieses Skript kennt kein Secret und gibt keines aus; der Registry-Login bleibt im Workflow.
#
# Phase 18 (18-02): Die Desktop-Pakete kommen aus dem vorgeschalteten Job `desktop`
# und werden per actions/cache als desktop-dist/ uebergeben; das Dockerfile der API
# kopiert desktop-dist/ ins Abbild. Ohne desktop-dist/manifest.json bricht dieses
# Skript im echten Baupfad hart ab -- zweites Netz gegen Pitfall 1 (Cache-Fehlschlag),
# der Workflow selbst prueft es bereits vor diesem Schritt.
set -eu set -eu
REGISTRY="${REGISTRY:-localhost:3002/schalli/tessera-ctl}" REGISTRY="${REGISTRY:-localhost:3002/schalli/tessera-ctl}"
@@ -54,6 +60,11 @@ if [ "${1:-}" = "--print-plan" ]; then
exit 0 exit 0
fi fi
if [ ! -f desktop-dist/manifest.json ]; then
echo "desktop-dist/manifest.json fehlt -- kein Abbild ohne Desktop-Pakete (Pitfall 1)." >&2
exit 1
fi
for IMG in web api; do for IMG in web api; do
docker build -t "$REGISTRY/$IMG:$APP_CHANNEL" \ docker build -t "$REGISTRY/$IMG:$APP_CHANNEL" \
--build-arg APP_VERSION="$APP_VERSION" \ --build-arg APP_VERSION="$APP_VERSION" \
+84 -1
View File
@@ -2,6 +2,8 @@
# Tag v* -> Kanal live (Etiketten live + vX.Y.Z); Zweig live ohne Tag wird nur geprueft. # 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. # 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). # Tag v* (quick-260916-dcz): zusaetzlich Gitea-Release aus dem CHANGELOG.md-Abschnitt (publish-release.sh).
# Phase 18 (18-02): Job `desktop` baut vor `publish` das Linux-AppImage (Windows-NSIS
# folgt in 18-05) und uebergibt es per actions/cache; `publish` bricht ohne Manifest ab.
name: Tessera CI/CD name: Tessera CI/CD
on: on:
@@ -52,16 +54,97 @@ jobs:
- name: Run tests - name: Run tests
run: pnpm test run: pnpm test
desktop:
name: Desktop-Pakete bauen
runs-on: ubuntu-latest
needs: test
if: gitea.ref == 'refs/heads/main' || startsWith(gitea.ref, 'refs/tags/v')
steps:
# Ohne volle Historie und Tags liefert `git describe` nichts -- Pflicht fuer die Version.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- 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: Systemabhaengigkeiten
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
libwebkit2gtk-4.1-dev libjavascriptcoregtk-4.1-dev \
libayatana-appindicator3-dev librsvg2-dev \
libgtk-3-dev libssl-dev patchelf file xdg-utils
- name: Rust-Toolchain
run: |
curl -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Cargo-Zwischenspeicher
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cache/tauri
apps/desktop/src-tauri/target
key: desktop-cargo-${{ hashFiles('apps/desktop/src-tauri/Cargo.lock') }}
restore-keys: desktop-cargo-
- name: Version setzen
run: sh .gitea/scripts/desktop-version.sh
- name: Rust pruefen
working-directory: apps/desktop/src-tauri
run: |
cargo check
cargo clippy
- name: Alte Bundles entfernen
run: rm -rf apps/desktop/src-tauri/target/release/bundle
- name: Linux-AppImage bauen
run: pnpm --filter @tessera/desktop exec tauri build --bundles appimage
- name: Pakete einsammeln
run: sh .gitea/scripts/desktop-collect.sh --require linux
- name: Uebergabe an publish
uses: actions/cache/save@v4
with:
path: desktop-dist
key: desktop-dist-${{ gitea.sha }}
publish: publish:
name: Build & Publish Images name: Build & Publish Images
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: test needs: desktop
steps: steps:
# Ohne volle Historie und Tags liefert `git describe` nichts -- Pflicht fuer den Stempel. # Ohne volle Historie und Tags liefert `git describe` nichts -- Pflicht fuer den Stempel.
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Desktop-Pakete aus dem Zwischenspeicher holen
uses: actions/cache/restore@v4
with:
path: desktop-dist
key: desktop-dist-${{ gitea.sha }}
fail-on-cache-miss: true
- name: Pakete pruefen
run: |
test -f desktop-dist/manifest.json
jq . desktop-dist/manifest.json
- name: Log in to Gitea Container Registry - name: Log in to Gitea Container Registry
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login localhost:3002 -u ${{ gitea.actor }} --password-stdin run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login localhost:3002 -u ${{ gitea.actor }} --password-stdin