Stufe 0: Grundgerüst mit Rechenkern, Datenbank, Oberfläche und Docker-Betrieb
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
This commit is contained in:
46
.github/workflows/ci.yml
vendored
Normal file
46
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
name: Prüfung
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
env:
|
||||
POSTGRES_USER: betrieb
|
||||
POSTGRES_PASSWORD: betrieb
|
||||
POSTGRES_DB: betrieb_test
|
||||
ports: ["5432:5432"]
|
||||
options: --health-cmd "pg_isready -U betrieb" --health-interval 5s --health-retries 20
|
||||
env:
|
||||
TEST_DATABASE_URL: postgres://betrieb:betrieb@localhost:5432/betrieb_test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run typecheck
|
||||
- run: npm test
|
||||
- run: npm run build
|
||||
|
||||
container:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- name: Probe-Build App
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
- name: Probe-Build Sicherung
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: backup
|
||||
push: false
|
||||
38
.github/workflows/release.yml
vendored
Normal file
38
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# Freigabe: Versionsnummer als Tag setzen (z. B. v1.0.0). Daraus entsteht das Image
|
||||
# ghcr.io/<besitzer>/<repo>:1.0.0, das auf dem Server mit deploy/update.sh eingespielt wird.
|
||||
name: Release
|
||||
on:
|
||||
push:
|
||||
tags: ["v*.*.*"]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: docker/setup-buildx-action@v3
|
||||
- uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- id: v
|
||||
run: |
|
||||
echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
|
||||
echo "image=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
build-args: APP_VERSION=${{ steps.v.outputs.version }}
|
||||
tags: ${{ steps.v.outputs.image }}:${{ steps.v.outputs.version }}
|
||||
- name: Release-Notiz aus CHANGELOG.md
|
||||
run: |
|
||||
awk -v v="${{ steps.v.outputs.version }}" '$0 ~ "^## " v {f=1; next} /^## /{f=0} f' CHANGELOG.md > notiz.md
|
||||
gh release create "$GITHUB_REF_NAME" --title "Version ${{ steps.v.outputs.version }}" --notes-file notiz.md
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
Reference in New Issue
Block a user