diff --git a/.github/workflows/latest.yml b/.github/workflows/latest.yml index 713958a..47d0f74 100644 --- a/.github/workflows/latest.yml +++ b/.github/workflows/latest.yml @@ -16,6 +16,13 @@ jobs: run: make build_latest - name: test latest run: make test_latest + - name: setup qemu (to run builders other than host) + uses: docker/setup-qemu-action@master + with: + platforms: all + - name: setup buildx (used by our 'release_latest' makefile target for multi-arch releases) + id: buildx + uses: docker/setup-buildx-action@master - name: login to docker hub uses: docker/login-action@v1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4aff228..9c431ff 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,13 @@ jobs: run: make build VERSION=$RELEASE_VERSION - name: test all image variants run: make test VERSION=$RELEASE_VERSION + - name: setup qemu (to run builders other than host) + uses: docker/setup-qemu-action@master + with: + platforms: all + - name: setup buildx (used by our 'release' makefile target for multi-arch releases) + id: buildx + uses: docker/setup-buildx-action@master - name: login to docker hub uses: docker/login-action@v1 with: diff --git a/Makefile b/Makefile index 0fadc56..3bae87b 100644 --- a/Makefile +++ b/Makefile @@ -86,5 +86,7 @@ release_1.22: TAG=${VERSION}-kubectl-${KUBECTL_1.22} release_latest: TAG=latest release_1.18 release_1.19 release_1.20 release_1.21 release_1.22 release_latest: @echo -e "\n[${COLOR_BLUE}release${COLOR_RESET}/${COLOR_TEAL}${TAG}${COLOR_RESET}] ${COLOR_ORANGE}Pushing image${COLOR_RESET}..." - @docker push ${IMAGE}:${TAG} - @docker push ${IMAGE}:$(shell echo ${TAG} | rev | cut -d '.' -f2- | rev ) + @docker buildx create --name k8s-resource-builder + @docker buildx build --builder k8s-resource-builder --platform linux/amd64,linux/arm64/v8 --push --tag ${IMAGE}:$(shell echo ${TAG} | rev | cut -d '.' -f2- | rev ) . + @docker buildx build --builder k8s-resource-builder --platform linux/amd64,linux/arm64/v8 --push --tag ${IMAGE}:${TAG} . + @docker buildx rm k8s-resource-builder