meldestelle/.gitea/workflows/docker-publish.yaml
StefanMoCoAt 16d3f46e88
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
Final fix: remove typo and hardcode registry paths
2026-03-03 21:53:38 +01:00

100 lines
2.8 KiB
YAML

name: Build and Publish Docker Images
on:
push:
branches: [ "main" ]
paths:
- 'backend/**'
- 'core/**'
- 'frontend/**'
- 'config/docker/**'
- 'docker-compose.yaml'
- '.gitea/workflows/docker-publish.yaml'
jobs:
# JOB 1: Backend & Keycloak (Kein schwerer JS-Build)
build-backend:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- service: api-gateway
dockerfile: backend/infrastructure/gateway/Dockerfile
- service: ping-service
dockerfile: backend/services/ping/Dockerfile
- service: keycloak
dockerfile: config/docker/keycloak/Dockerfile
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
- name: Set up Docker Buildx
uses: actions/setup-buildx-action@v3
- name: Log in to Registry
uses: docker/login-action@v3
with:
registry: git.mo-code.at
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
push: true
tags: git.mo-code.at/mocode-software/meldestelle/${{ matrix.service }}:latest
build-args: |
GRADLE_VERSION=9.3.1
JAVA_VERSION=25
JVM_OPTS_APPEND=-XX:ActiveProcessorCount=8 -XX:+UseG1GC -XX:+UseSVE=1
# JOB 2: Frontend (Eigener Job für maximalen RAM)
build-frontend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '25'
distribution: 'temurin'
- name: Build JS Frontend
run: |
chmod +x gradlew
./gradlew :frontend:shells:meldestelle-portal:jsBrowserDistribution \
-Pproduction=true \
--max-workers=4 \
--no-daemon \
-Dkotlin.daemon.jvm.options="-Xmx4g"
- name: Set up Docker Buildx
uses: actions/setup-buildx-action@v3
- name: Log in to Registry
uses: docker/login-action@v3
with:
registry: git.mo-code.at
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push Web-App
uses: docker/build-push-action@v5
with:
context: .
file: config/docker/caddy/web-app/Dockerfile
push: true
tags: git.mo-code.at/mocode-software/meldestelle/web-app:latest