From 03773817291adb63fc95180a6e1b536245a59b3e Mon Sep 17 00:00:00 2001 From: Daniel Butler Date: Mon, 23 Oct 2023 09:39:20 +0100 Subject: [PATCH 1/4] removing extra whitespace in builder image name --- .github/workflows/push.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index bad87e7f..2fcdd122 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -121,7 +121,7 @@ jobs: push: true build-args: | BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} - BUILDER_IMAGE= ${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} + BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} cache-to: type=inline platforms: linux/amd64,linux/arm,linux/arm64 tags: | @@ -168,7 +168,7 @@ jobs: push: true build-args: | BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} - BUILDER_IMAGE= ${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} + BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} cache-to: type=inline platforms: linux/amd64,linux/arm,linux/arm64 tags: | From 7568cb38412562c3389f856a18073a25f4f1a886 Mon Sep 17 00:00:00 2001 From: Daniel Butler Date: Mon, 23 Oct 2023 10:58:04 +0100 Subject: [PATCH 2/4] removing linux/arm from ubi builds --- .github/workflows/pull_request.yaml | 6 +++--- .github/workflows/push.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 292355c1..11a43c38 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -136,7 +136,7 @@ jobs: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }} cache-to: type=inline - platforms: linux/amd64,linux/arm,linux/arm64 + platforms: linux/amd64,linux/arm64 tags: | ${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_UBI_TAG }} labels: | @@ -181,9 +181,9 @@ jobs: push: true build-args: | BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} - BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }} + BUILDER_IMAGE=gcr.io/${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }} cache-to: type=inline - platforms: linux/amd64,linux/arm,linux/arm64 + platforms: linux/amd64,linux/arm64 tags: | ${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_UBI_TAG }} labels: | diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index 2fcdd122..ff048187 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -123,7 +123,7 @@ jobs: BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} cache-to: type=inline - platforms: linux/amd64,linux/arm,linux/arm64 + platforms: linux/amd64,linux/arm64 tags: | ${{ env.DOCKER_IMAGE_REPOSITORY }}:ubi-${{ steps.generate_tag.outputs.new_tag }} labels: | @@ -168,9 +168,9 @@ jobs: push: true build-args: | BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} - BUILDER_IMAGE=${{ env.DOCKER_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} + BUILDER_IMAGE=gcr.io/${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} cache-to: type=inline - platforms: linux/amd64,linux/arm,linux/arm64 + platforms: linux/amd64,linux/arm64 tags: | ${{ env.GHCR_IMAGE_REPOSITORY }}:ubi-${{ steps.generate_tag.outputs.new_tag }} labels: | From 5535656717e0b8764f7d62230545ac7c26607f5d Mon Sep 17 00:00:00 2001 From: Daniel Butler Date: Mon, 23 Oct 2023 10:58:33 +0100 Subject: [PATCH 3/4] include platform in from builder image --- Dockerfile.ubi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.ubi b/Dockerfile.ubi index 43ce0106..33d13480 100644 --- a/Dockerfile.ubi +++ b/Dockerfile.ubi @@ -1,9 +1,9 @@ ARG BUILDER_IMAGE ARG BASE_IMAGE -FROM ${BUILDER_IMAGE} as SRC +FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} as SRC -FROM ${BASE_IMAGE:-registry.access.redhat.com/ubi8/ubi-minimal} +FROM ${BASE_IMAGE:-registry.access.redhat.com/ubi8/ubi-minimal:latest} WORKDIR / COPY --from=SRC /manager . From fdcdcd8770fff708b19a0a904575342276273db9 Mon Sep 17 00:00:00 2001 From: Daniel Butler Date: Mon, 23 Oct 2023 14:15:35 +0100 Subject: [PATCH 4/4] fix gcr to ghcr --- .github/workflows/pull_request.yaml | 2 +- .github/workflows/push.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 11a43c38..828879a7 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -181,7 +181,7 @@ jobs: push: true build-args: | BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} - BUILDER_IMAGE=gcr.io/${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }} + BUILDER_IMAGE=ghcr.io/${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.GIT_TAG }} cache-to: type=inline platforms: linux/amd64,linux/arm64 tags: | diff --git a/.github/workflows/push.yaml b/.github/workflows/push.yaml index ff048187..4c7a02bc 100644 --- a/.github/workflows/push.yaml +++ b/.github/workflows/push.yaml @@ -168,7 +168,7 @@ jobs: push: true build-args: | BUILD_PARAMETERS=${{ env.BUILD_PARAMETERS }} - BUILDER_IMAGE=gcr.io/${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} + BUILDER_IMAGE=ghcr.io/${{ env.GHCR_IMAGE_REPOSITORY }}:${{ steps.generate_tag.outputs.new_tag }} cache-to: type=inline platforms: linux/amd64,linux/arm64 tags: |