another fix
Some checks failed
Docker Build Smart Logic / Build amd64 & arm64 (push) Failing after 7s

This commit is contained in:
2026-02-09 17:42:10 +01:00
parent c60dd184f3
commit e022611fe4

View File

@@ -170,39 +170,53 @@ jobs:
- name: Build & push multiarch - name: Build & push multiarch
if: steps.check_files.outputs.should_build == 'true' if: steps.check_files.outputs.should_build == 'true'
shell: bash
run: | run: |
echo "== Multiarch Build Start ==" echo "== Multiarch Build Start =="
# Build amd64 # versions.env direkt hier laden
BASE_IMAGE=$(grep ^BASE_IMAGE= versions.env | cut -d '=' -f2-)
APP_VERSION=$(grep ^APP_VERSION= versions.env | cut -d '=' -f2-)
echo "BASE_IMAGE=$BASE_IMAGE"
echo "APP_VERSION=$APP_VERSION"
if [ -z "$BASE_IMAGE" ]; then
echo "BASE_IMAGE is empty → abort"
exit 1
fi
# amd64 build
docker buildx build \ docker buildx build \
--platform linux/amd64 \ --platform linux/amd64 \
-f ${AMD64_DOCKERFILE} \ -f ${AMD64_DOCKERFILE} \
--build-arg BASE_IMAGE=$BASE_IMAGE \ --build-arg BASE_IMAGE="$BASE_IMAGE" \
--build-arg APP_VERSION=$APP_VERSION \ --build-arg APP_VERSION="$APP_VERSION" \
--label org.opencontainers.image.version=$APP_VERSION \ --label org.opencontainers.image.version="$APP_VERSION" \
--label org.opencontainers.image.created=$BUILD_DATE \ --label org.opencontainers.image.created="$BUILD_DATE" \
-t ${CACHE_IMAGE_NAME}:${VERSION}-amd64 \ -t ${CACHE_IMAGE_NAME}:${VERSION}-amd64 \
--push . --push .
# Build arm64 # arm64 build
docker buildx build \ docker buildx build \
--platform linux/arm64 \ --platform linux/arm64 \
-f ${ARM64_DOCKERFILE} \ -f ${ARM64_DOCKERFILE} \
--build-arg BASE_IMAGE=$BASE_IMAGE \ --build-arg BASE_IMAGE="$BASE_IMAGE" \
--build-arg APP_VERSION=$APP_VERSION \ --build-arg APP_VERSION="$APP_VERSION" \
--label org.opencontainers.image.version=$APP_VERSION \ --label org.opencontainers.image.version="$APP_VERSION" \
--label org.opencontainers.image.created=$BUILD_DATE \ --label org.opencontainers.image.created="$BUILD_DATE" \
-t ${CACHE_IMAGE_NAME}:${VERSION}-arm64 \ -t ${CACHE_IMAGE_NAME}:${VERSION}-arm64 \
--push . --push .
# Merge into manifest docker buildx imagetools create \
docker buildx imagetools create -t ${IMAGE_NAME}:${VERSION} \ -t ${IMAGE_NAME}:${VERSION} \
${CACHE_IMAGE_NAME}:${VERSION}-amd64 \ ${CACHE_IMAGE_NAME}:${VERSION}-amd64 \
${CACHE_IMAGE_NAME}:${VERSION}-arm64 ${CACHE_IMAGE_NAME}:${VERSION}-arm64
echo "== Multiarch Build Complete ==" echo "== Multiarch Build Complete =="
- name: Generate SBOM - name: Generate SBOM
run: | run: |
docker sbom ${IMAGE_NAME}:edge > sbom.spdx.json || true docker sbom ${IMAGE_NAME}:edge > sbom.spdx.json || true