From 9a8996fd7f103b75e9d287b4098d556508d287c6 Mon Sep 17 00:00:00 2001 From: dxfeng10 Date: Sun, 25 Apr 2021 11:02:37 +0800 Subject: [PATCH] add docker action to maven workflow --- .github/workflows/maven.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 138d410..fd1accf 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -62,3 +62,23 @@ jobs: files: ./fizz-gateway-community-${{ steps.releaseVersion.outputs.substring }}.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Set up QEMU + if: startsWith(github.ref, 'refs/tags/') + uses: docker/setup-qemu-action@v1 + - name: Set up Docker Buildx + if: startsWith(github.ref, 'refs/tags/') + uses: docker/setup-buildx-action@v1 + - name: Login to DockerHub + if: startsWith(github.ref, 'refs/tags/') + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build and push + if: startsWith(github.ref, 'refs/tags/') + uses: docker/build-push-action@v2 + with: + file: ./fizz-bootstrap/Dockerfile + context: . + push: true + tags: fizzgate/fizz-gateway-community:${{ github.ref }}