From 5ced901ae8e6a6a3034727555ef9f5ba718a4a53 Mon Sep 17 00:00:00 2001 From: meeb Date: Thu, 27 May 2021 20:12:02 +1000 Subject: [PATCH] streamline multi-arch build, part of #81 --- .github/workflows/ci.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index dca935e..0bcb77a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -36,14 +36,11 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Create a new container builder - run: docker buildx create --name builder && docker buildx use builder - - name: Build the container image - run: docker buildx build --platform linux/amd64 --tag $IMAGE_NAME . - name: Log into GitHub Container Registry run: echo "${{ secrets.REGISTRY_ACCESS_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin - - name: Push image to GitHub Container Registry + - name: Build the container image run: | LATEST_TAG=ghcr.io/meeb/$IMAGE_NAME:latest - docker tag $IMAGE_NAME $LATEST_TAG - docker push $LATEST_TAG + docker buildx create --name builder + docker buildx use builder + docker buildx build --platform linux/amd64 --tag $IMAGE_NAME --push .