Files
wibosim/.github/workflows/ci.yml
T
db9979andClaude Opus 5.5 939fe5def5 Version 0.9.0, Änderungsprotokoll und automatisches Update
- Versionsnummer, Build (Git-Commit) und Bauzeit unter /api/version, in /api/info und hello
- Änderungsprotokoll für Spieler unter /api/changelog (Test prüft Übereinstimmung mit package.json)
- Server meldet Neustarts an die Clients; statische Dateien ohne langes Zwischenspeichern
- Admin: Hinweis, wenn auf GitHub eine neuere Version liegt
- Pi: scripts/install-autoupdate.sh (systemd-Timer oder cron) mit Zeitfenster, Gesundheitscheck und automatischem Zurückrollen
- CI übergibt Bauzeit ans Image; Doku zu Updates, Versionen und KI-Auswertung

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUhQVoPUusUzxgxLWkK
2026-12-03 19:56:03 +00:00

69 lines
1.8 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: server
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: server/package-lock.json
- run: npm ci
- run: npm test
image:
# Multi-Arch-Image (amd64 + arm64 für den Raspberry Pi) nach ghcr.io – nur nach erfolgreichen Tests auf main/Tags
needs: test
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- id: built
run: echo "at=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
- id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha,format=short
type=semver,pattern={{version}}
- uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
VERSION=${{ github.sha }}
BUILT_AT=${{ steps.built.outputs.at }}
cache-from: type=gha
cache-to: type=gha,mode=max