Optimize workflow: reintroduce metadata extraction, adjust Docker image build steps, and enable ARM64 focus with caching placeholders
Some checks failed
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, gateway, api-gateway) (push) Successful in 9m15s
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Successful in 9m7s
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Failing after 29m20s
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Successful in 1m58s

This commit is contained in:
Stefan Mogeritsch 2026-03-04 16:43:37 +01:00
parent 00f1df4b4d
commit db2b4a4027

View File

@ -93,44 +93,47 @@ jobs:
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: 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: .
# file: ${{ matrix.dockerfile }}
# push: true
# tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.name }}:latest
# 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 }}
# JVM_OPTS_APPEND=${{ env.JVM_OPTS_ARM64 }}
- 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
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_PREFIX }}/${{ matrix.name }}:latest
# Fokus auf ARM64 für Zora, AMD64 bleibt für Kompatibilität (optional)
platforms: linux/arm64
tags: ${{ steps.meta.outputs.tags }}
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 }}
# cache-from: type=local,src=/tmp/.buildx-cache
# cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
# cache-from: type=gha
# cache-to: type=gha,mode=max