From 97c4b7672cd8e7475831970fb2ca477bb02c314c Mon Sep 17 00:00:00 2001 From: Stefan Mogeritsch Date: Wed, 4 Mar 2026 14:29:57 +0100 Subject: [PATCH] refactor: clean up and streamline Docker workflow configurations Removed unused steps and comments in `.gitea/workflows/docker-publish.yaml`, updated actions to latest versions, and standardized build configurations. Improved clarity and maintainability of Docker build and push processes. --- .gitea/workflows/docker-publish.yaml | 60 ++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/docker-publish.yaml b/.gitea/workflows/docker-publish.yaml index c077d799..999e3a57 100644 --- a/.gitea/workflows/docker-publish.yaml +++ b/.gitea/workflows/docker-publish.yaml @@ -73,7 +73,7 @@ jobs: key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} restore-keys: | ${{ runner.os }}-gradle- - # Frontend Build (Nur für web-app notwendig) + - name: Build Frontend (Kotlin JS) if: matrix.service == 'web-app' run: | @@ -82,39 +82,65 @@ jobs: -Pproduction=true \ --max-workers=8 \ -Dkotlin.daemon.jvm.options="-Xmx4g" + - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - # Login bei deiner Gitea Registry + uses: actions/setup-buildx-action@v3 + - name: Log in to the Container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ secrets.REGISTRY_USER }} password: ${{ secrets.REGISTRY_TOKEN }} + + +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@v3 +# # Login bei deiner Gitea Registry +# - name: Log in to the Container registry +# uses: docker/login-action@v3 +# with: +# registry: ${{ env.REGISTRY }} +# username: ${{ secrets.REGISTRY_USER }} +# password: ${{ secrets.REGISTRY_TOKEN }} # Metadaten extrahieren (Tags, Labels) - - name: Extract metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.image }} - tags: | - type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} - type=sha,format=long - # Build und Push (Nativ ARM64 für maximale Geschwindigkeit) +# - name: Extract metadata +# id: meta +# uses: docker/metadata-action@v5 +# with: +# images: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.image }} +# tags: | +# type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }} +# type=sha,format=long +# # Build und Push (Nativ ARM64 für maximale Geschwindigkeit) +# - name: Build and push Docker image +# uses: docker/build-push-action@v6 +# with: +# context: ${{ matrix.context }} +# file: ${{ matrix.dockerfile }} +# push: true +# # Fokus auf ARM64 für Zora, AMD64 bleibt für Kompatibilität (optional) +# platforms: linux/arm64 +# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.name }}:latest +# labels: ${{ steps.meta.outputs.labels }} +# build-args: | +# DOCKER_BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') +# VERSION=${{ github.sha }} +# GRADLE_VERSION=${{ env.GRADLE_VERSION }} +# JAVA_VERSION=${{ env.JAVA_VERSION }} +# KEYCLOAK_IMAGE_TAG=26.4 +# JVM_OPTS_APPEND=${{ env.JVM_OPTS_ARM64 }} + - name: Build and push Docker image uses: docker/build-push-action@v6 with: - context: ${{ matrix.context }} + context: . file: ${{ matrix.dockerfile }} push: true - # Fokus auf ARM64 für Zora, AMD64 bleibt für Kompatibilität (optional) - platforms: linux/arm64 tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.name }}:latest - labels: ${{ steps.meta.outputs.labels }} build-args: | DOCKER_BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') VERSION=${{ github.sha }} GRADLE_VERSION=${{ env.GRADLE_VERSION }} JAVA_VERSION=${{ env.JAVA_VERSION }} - KEYCLOAK_IMAGE_TAG=26.4 JVM_OPTS_APPEND=${{ env.JVM_OPTS_ARM64 }}