Files
wibosim/.github/workflows/ci.yml
T
db9979andClaude Opus 5.5 e93135cc83 Betrieb: CI mit Multi-Arch-Image, Rollback, HTTPS-Profil, API-Doku
- GitHub Actions: Tests, danach Image für amd64/arm64 nach ghcr.io (latest + sha-Tags)
- docker-compose: fertiges Image mit Build-Fallback, Versions-Tag, Caddy-Profil „https“ (tls internal)
- deploy-pi.sh holt das Image (Fallback: lokal bauen) und prüft die Gesundheit; rollback.sh für Version oder Datenbanksicherung
- Dockerfile mit Versionslabel, ohne Testdateien
- docs/API.md: vollständige REST/WebSocket-Schnittstelle; KONZEPT: Architektur, Sicherheit, Roadmap aktualisiert

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

65 lines
1.7 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: 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 }}
cache-from: type=gha
cache-to: type=gha,mode=max