From 62005c76072561ade0433856e74906d62d7400ec Mon Sep 17 00:00:00 2001 From: Wey Gu Date: Thu, 1 Dec 2022 11:11:04 +0800 Subject: [PATCH] Docker Push with arm64 (#189) * Docker Push with arm64 - enable nightly docker build push - us v3 and buildx for docker build in release with arm64 * removed duplicated tags line * removed qumu --- .github/workflows/docker.yml | 3 +-- .github/workflows/release.yml | 35 ++++++++++++++++++++++++++++------- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6038a9c..9f9d59d 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -10,8 +10,6 @@ jobs: name: build docker image runs-on: ubuntu-latest steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v1 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - name: Log into registry @@ -24,3 +22,4 @@ jobs: with: platforms: linux/amd64,linux/arm64 tags: vesoft/nebula-console/nightly, vesoft/nebula-console/v3-nightly + push: true diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 445636a..15ba9e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -63,13 +63,34 @@ jobs: name: build docker image runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Build and push Docker images - uses: docker/build-push-action@v1 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + - name: Docker meta + id: meta + uses: docker/metadata-action@v3 + with: + images: | + vesoft/nebula-console + tags: | + # git tag & latest coverred + type=ref,event=tag + # git branch + type=ref,event=branch + # v3 + type=semver,pattern=v{{version}} + # v3.0 + type=semver,pattern=v{{major}}.{{minor}} + # v3.0.0 + type=semver,pattern=v{{major}}.{{minor}}.{{patch}} + - name: Log into registry + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - repository: vesoft/nebula-console - tags: v3,latest - tag_with_ref: true - add_git_labels: true + - name: Build and push Docker images + uses: docker/build-push-action@v3 + with: + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }}