This is an automated email from the ASF dual-hosted git repository. shuyangw pushed a commit to branch ci/release-on-multiarch in repository https://gitbox.apache.org/repos/asf/apisix-docker.git
commit 98de11d96ad6081d9c1af2454afc76be48544e17 Author: yiyiyimu <[email protected]> AuthorDate: Mon Jul 12 23:41:23 2021 -0400 ci: release on multiarch Signed-off-by: yiyiyimu <[email protected]> --- .github/workflows/apisix_push_docker_hub.yaml | 7 +++++-- Makefile | 20 ++++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.github/workflows/apisix_push_docker_hub.yaml b/.github/workflows/apisix_push_docker_hub.yaml index faa5925..77c9993 100644 --- a/.github/workflows/apisix_push_docker_hub.yaml +++ b/.github/workflows/apisix_push_docker_hub.yaml @@ -18,7 +18,10 @@ jobs: - name: Login run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username=${{ secrets.DOCKER_USERNAME }} --password-stdin + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v1 + - name: Push apisix image to Docker Hub run: - make build-on-${{ matrix.platform }} - make push-on-${{ matrix.platform }} + make push-multiarch-on-${{ matrix.platform }} diff --git a/Makefile b/Makefile index 92b75fc..94d091c 100644 --- a/Makefile +++ b/Makefile @@ -39,14 +39,22 @@ build-on-alpine-local: docker build -t $(IMAGE_NAME):$(APISIX_VERSION)-alpine-local --build-arg APISIX_PATH=${APISIX_PATH} -f ./alpine-local/Dockerfile . ### push-on-centos: Push apache/apisix:xx-centos image -push-on-centos: - docker push $(IMAGE_NAME):$(APISIX_VERSION)-centos - docker build -t $(IMAGE_NAME):latest -f ./centos/Dockerfile . - docker push $(IMAGE_NAME):latest +push-multiarch-on-centos: + docker buildx build --push \ + -t $(IMAGE_NAME):$(APISIX_VERSION)-centos \ + --platform linux/amd64,linux/arm64 \ + -f ./centos/Dockerfile . + docker buildx build --push \ + -t $(IMAGE_NAME):latest \ + --platform linux/amd64,linux/arm64 \ + -f ./centos/Dockerfile . ### push-on-alpine: Push apache/apisix:xx-alpine image -push-on-alpine: - docker push $(IMAGE_NAME):$(APISIX_VERSION)-alpine +push-multiarch-on-alpine: + docker buildx build --push \ + -t $(IMAGE_NAME):$(APISIX_VERSION)-alpine \ + --platform linux/amd64,linux/arm64 \ + -f ./alpine/Dockerfile . ### build-on-alpine-cn: Build apache/apisix:xx-alpine image (for chinese) build-on-alpine-cn:
