Fix: Update workflow with static step names, direct paths, and job dependencies
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 5s
Build and Publish Docker Images / build-frontend (push) Has been skipped

This commit is contained in:
2026-03-03 22:45:15 +01:00
parent 09ab7c518a
commit 146f29360c
+17 -14
View File
@@ -12,11 +12,12 @@ on:
- '.gitea/workflows/docker-publish.yaml' - '.gitea/workflows/docker-publish.yaml'
jobs: jobs:
# JOB 1: Backend Services (api-gateway, ping-service, keycloak) # JOB 1: Backend & Infrastructure (Sequenziell durch max-parallel: 1)
build-backend: build-backend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: true
max-parallel: 1 # WICHTIG: Verhindert den gleichzeitigen GitHub-Zugriff & RAM-Overload
matrix: matrix:
include: include:
- service: api-gateway - service: api-gateway
@@ -27,51 +28,53 @@ jobs:
dockerfile: config/docker/keycloak/Dockerfile dockerfile: config/docker/keycloak/Dockerfile
steps: steps:
- name: Checkout repository - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up JDK 25 - name: Java Setup
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
java-version: '25' java-version: '25'
distribution: 'temurin' distribution: 'temurin'
- name: Set up Docker Buildx - name: Buildx Setup
uses: actions/setup-buildx-action@v3 uses: actions/setup-buildx-action@v3
- name: Log in to Registry - name: Registry Login
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.mo-code.at 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 image - name: Docker 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
# Hardcoded Pfad zur Vermeidung von Auflösungsfehlern
tags: git.mo-code.at/mocode-software/meldestelle/${{ matrix.service }}:latest tags: git.mo-code.at/mocode-software/meldestelle/${{ matrix.service }}:latest
build-args: | build-args: |
GRADLE_VERSION=9.3.1 GRADLE_VERSION=9.3.1
JAVA_VERSION=25 JAVA_VERSION=25
JVM_OPTS_APPEND=-XX:ActiveProcessorCount=8 -XX:+UseG1GC -XX:+UseSVE=1 JVM_OPTS_APPEND=-XX:ActiveProcessorCount=8 -XX:+UseG1GC -XX:+UseSVE=1
# JOB 2: Frontend (Separater Job für maximale RAM-Verfügbarkeit) # JOB 2: Frontend (Startet erst, wenn Backend-Jobs fertig sind)
build-frontend: build-frontend:
needs: build-backend
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout repository - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up JDK 25 - name: Java Setup
uses: actions/setup-java@v4 uses: actions/setup-java@v4
with: with:
java-version: '25' java-version: '25'
distribution: 'temurin' distribution: 'temurin'
- name: Build JS Frontend Artifacts - name: Compile Kotlin JS
run: | run: |
chmod +x gradlew chmod +x gradlew
./gradlew :frontend:shells:meldestelle-portal:jsBrowserDistribution \ ./gradlew :frontend:shells:meldestelle-portal:jsBrowserDistribution \
@@ -80,17 +83,17 @@ jobs:
--no-daemon \ --no-daemon \
-Dkotlin.daemon.jvm.options="-Xmx4g" -Dkotlin.daemon.jvm.options="-Xmx4g"
- name: Set up Docker Buildx - name: Buildx Setup
uses: actions/setup-buildx-action@v3 uses: actions/setup-buildx-action@v3
- name: Log in to Registry - name: Registry Login
uses: docker/login-action@v3 uses: docker/login-action@v3
with: with:
registry: git.mo-code.at 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: Docker Build and Push Web-App
uses: docker/build-push-action@v5 uses: docker/build-push-action@v5
with: with:
context: . context: .