You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sh...@apache.org on 2021/07/13 03:41:37 UTC

[apisix-docker] branch ci/release-on-multiarch created (now 98de11d)

This is an automated email from the ASF dual-hosted git repository.

shuyangw pushed a change to branch ci/release-on-multiarch
in repository https://gitbox.apache.org/repos/asf/apisix-docker.git.


      at 98de11d  ci: release on multiarch

This branch includes the following new commits:

     new 98de11d  ci: release on multiarch

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[apisix-docker] 01/01: ci: release on multiarch

Posted by sh...@apache.org.
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 <wo...@gmail.com>
AuthorDate: Mon Jul 12 23:41:23 2021 -0400

    ci: release on multiarch
    
    Signed-off-by: yiyiyimu <wo...@gmail.com>
---
 .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: