Final fix: remove typo and hardcode registry paths
Some checks failed
Build and Publish Docker Images / build-backend (backend/infrastructure/gateway/Dockerfile, api-gateway) (push) Failing after 5s
Build and Publish Docker Images / build-backend (backend/services/ping/Dockerfile, ping-service) (push) Failing after 5s
Build and Publish Docker Images / build-backend (config/docker/keycloak/Dockerfile, keycloak) (push) Failing after 4s
Build and Publish Docker Images / build-frontend (push) Failing after 5s

This commit is contained in:
Stefan Mogeritsch 2026-03-03 21:53:38 +01:00
parent 0dcaa6bc10
commit 16d3f46e88

View File

@ -5,26 +5,14 @@ on:
branches: [ "main" ] branches: [ "main" ]
paths: paths:
- 'backend/**' - 'backend/**'
- 'platform/**'
- 'core/**' - 'core/**'
- 'frontend/**' - 'frontend/**'
- 'config/docker/**' - 'config/docker/**'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'gradle.properties'
- 'docker-compose.yaml' - 'docker-compose.yaml'
- '.gitea/workflows/docker-publish.yaml' - '.gitea/workflows/docker-publish.yaml'
env:
REGISTRY: git.mo-code.at
IMAGE_PREFIX: mocode-software/meldestelle
JAVA_VERSION: '25'
GRADLE_VERSION: '9.3.1'
# Optimierte JVM Flags für den ARM-Runner
JVM_OPTS_ARM64: "-XX:ActiveProcessorCount=8 -XX:+UseG1GC -XX:+UseTransparentHugePages -XX:+UseSVE=1"
jobs: jobs:
# JOB 1: Backend Services & Keycloak # JOB 1: Backend & Keycloak (Kein schwerer JS-Build)
build-backend: build-backend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
@ -45,42 +33,32 @@ jobs:
- name: Set up JDK - name: Set up JDK
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
java-version: ${{ env.JAVA_VERSION }} java-version: '25'
distribution: 'temurin' distribution: 'temurin'
- name: Setup Gradle Cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-backend-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: actions/setup-buildx-action@v3 uses: actions/setup-buildx-action@v3
- name: Log in to the Container registry - name: Log in to Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: git.mo-code.at
username: ${{ secrets.REGISTRY_USER }} username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push Backend Image - name: Build and push
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: ${{ matrix.dockerfile }} file: ${{ matrix.dockerfile }}
push: true push: true
# Hier war der Fehler: Jetzt korrekt auf env.REGISTRY tags: git.mo-code.at/mocode-software/meldestelle/${{ matrix.service }}:latest
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.service }}:latest
build-args: | build-args: |
GRADLE_VERSION=${{ env.GRADLE_VERSION }} GRADLE_VERSION=9.3.1
JAVA_VERSION=${{ env.JAVA_VERSION }} JAVA_VERSION=25
JVM_OPTS_APPEND=${{ env.JVM_OPTS_ARM64 }} JVM_OPTS_APPEND=-XX:ActiveProcessorCount=8 -XX:+UseG1GC -XX:+UseSVE=1
DOCKER_BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
# JOB 2: Das speicherintensive Frontend (Web-App) # JOB 2: Frontend (Eigener Job für maximalen RAM)
build-frontend: build-frontend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@ -90,13 +68,12 @@ jobs:
- name: Set up JDK - name: Set up JDK
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
java-version: ${{ env.JAVA_VERSION }} java-version: '25'
distribution: 'temurin' distribution: 'temurin'
- name: Build Frontend (Kotlin JS) - name: Build JS Frontend
run: | run: |
chmod +x gradlew chmod +x gradlew
# Reduzierte Worker, um den RAM (10GB) nicht zu sprengen
./gradlew :frontend:shells:meldestelle-portal:jsBrowserDistribution \ ./gradlew :frontend:shells:meldestelle-portal:jsBrowserDistribution \
-Pproduction=true \ -Pproduction=true \
--max-workers=4 \ --max-workers=4 \
@ -106,17 +83,17 @@ jobs:
- name: Set up Docker Buildx - name: Set up Docker Buildx
uses: actions/setup-buildx-action@v3 uses: actions/setup-buildx-action@v3
- name: Log in to the Container registry - name: Log in to Registry
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: ${{ env.REGISTRY }} registry: git.mo-code.at
username: ${{ secrets.REGISTRY_USER }} username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }} password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push Web-App Image - name: Build and push Web-App
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .
file: config/docker/caddy/web-app/Dockerfile file: config/docker/caddy/web-app/Dockerfile
push: true push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/web-app:latest tags: git.mo-code.at/mocode-software/meldestelle/web-app:latest