From 7e5a3c9ba341168d01982ea4ac71e1f6348d2c59 Mon Sep 17 00:00:00 2001 From: Caleb Xavier Berger Date: Tue, 19 Jan 2021 02:28:24 -0500 Subject: [PATCH] [temp] simplify how image name is sent to second dockerfile Remove double :latest --- .github/workflows/Dockerfile.copyin | 2 +- .github/workflows/cross-compiling-docker.yml | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/Dockerfile.copyin b/.github/workflows/Dockerfile.copyin index 919f79195..d313ac59f 100644 --- a/.github/workflows/Dockerfile.copyin +++ b/.github/workflows/Dockerfile.copyin @@ -1,7 +1,7 @@ ARG builder # https://stackoverflow.com/a/63472135/3551604 -FROM ${TARGETPLATFORM}/${builder}:latest as builder +FROM "${builder}" as builder FROM alpine:latest diff --git a/.github/workflows/cross-compiling-docker.yml b/.github/workflows/cross-compiling-docker.yml index ec75e8862..29ed43748 100644 --- a/.github/workflows/cross-compiling-docker.yml +++ b/.github/workflows/cross-compiling-docker.yml @@ -22,6 +22,8 @@ jobs: - uses: actions/checkout@v2 - name: set docker target run: echo "DOCKER_TARGET=$(./.github/workflows/get-compiler.sh docker)" >> $GITHUB_ENV + - name: set docker image tag + run: echo "BUILDER_IMAGE_TAG=${DOCKER_TARGET}/${BUILDER_IMAGE_NAME}:latest" >> $GITHUB_ENV - uses: docker/setup-qemu-action@v1 - uses: docker/setup-buildx-action@v1 with: @@ -32,10 +34,10 @@ jobs: context: . file: ./.github/workflows/Dockerfile.builder load: true # load into local image store - tags: "${{ env.DOCKER_TARGET }}/${{ env.BUILDER_IMAGE_NAME }}:latest" + tags: "${{ env.BUILDER_IMAGE_TAG }}" build-args: "GOARCH=${{ env.GOARCH }}" # - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV - - run: docker image inspect "${{ env.DOCKER_TARGET }}/${{ env.BUILDER_IMAGE_NAME }}:latest" + - run: docker image inspect "${{ env.BUILDER_IMAGE_TAG }}" - name: build monolith uses: docker/build-push-action@v2 with: @@ -44,4 +46,4 @@ jobs: platforms: ${{ env.DOCKER_TARGET }} push: true tags: localhost:5000/matrixdotorg/dendrite-monolith:latest - build-args: "builder=${{ env.BUILDER_IMAGE_NAME }}\nDENDRITE_BINARY=dendrite-monolith-server" + build-args: "builder=${{ env.BUILDER_IMAGE_TAG }}\nDENDRITE_BINARY=dendrite-monolith-server"