Skip to content

Commit

Permalink
[KYUUBI apache#4576] Multi arch build for ARM support in Docker Hub
Browse files Browse the repository at this point in the history
Close apache#4576

* Setup QEMU and Buildx.
* Use action docker/build-push-actionv4.
* build multi platform (amd64, arm64)
* build cache for faster build ✨

### _Why are the changes needed?_

Based on This [Disscussion](apache#4487) and [Issue](apache#4576)

Update publish-snapshot-docker workflow

### _How was this patch tested?_
now test in progress...

![image](https://user-images.githubusercontent.com/34825352/226776684-4d57dd0e-141a-44a0-a023-8eb43b57bdba.png)

https://github.com/phyyou/_kyuubi/actions/runs/4485366649/jobs/7886838765

- [x] Add screenshots for manual tests if appropriate

- [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request

Closes apache#4577 from phyyou/feat/buildx-at-docker-hub-snapshot.

Closes apache#4576

b75b05e [phyyou] chore(build): Chore on workflow yml
11353e7 [phyyou] build: Update publish snapshot docker workflow

Authored-by: phyyou <gydudwls@gmail.com>
Signed-off-by: Cheng Pan <chengpan@apache.org>
  • Loading branch information
phyyou authored and pan3793 committed Mar 22, 2023
1 parent 1419193 commit da000c6
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/publish-snapshot-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,23 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build Kyuubi Docker Image
run: docker build --tag apache/kyuubi:master-snapshot --file build/Dockerfile .
- name: Docker image
run: docker images
- name: Push Docker image
run: docker push apache/kyuubi:master-snapshot
- name: Build and Push Kyuubi Docker Image
uses: docker/build-push-action@v4
with:
# build cache on Github Actions, See: https://docs.docker.com/build/cache/backends/gha/#using-dockerbuild-push-action
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: build/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: apache/kyuubi:master-snapshot

0 comments on commit da000c6

Please sign in to comment.