diff --git a/.github/workflows/release_tag.yml b/.github/workflows/release_tag.yml index 3f83637..50d33d0 100644 --- a/.github/workflows/release_tag.yml +++ b/.github/workflows/release_tag.yml @@ -57,12 +57,19 @@ jobs: image_release: needs: build + if: ${{ success() }} && github.event_name != 'pull_request' runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 + - name: Set up Docker Buildx + uses: crazy-max/ghaction-docker-buildx@v3 + with: + buildx-version: latest + qemu-version: latest + - name: Login to DockerHub uses: docker/login-action@v1 with: @@ -76,8 +83,12 @@ jobs: tagRegex: "v(.*)" tagRegexGroup: 1 - - name: Docker build and push - uses: docker/build-push-action@v2 - with: - push: true - tags: tomasfarias/c2g:${{ steps.tagName.outputs.tag }},tomasfarias/c2g:latest + - name: Docker buildx and push + run: | + docker buildx build \ + --platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 \ + --output "type=image,push=true" \ + --tag tomasfarias/c2g:latest \ + --tag tomasfarias/c2g:${{ steps.tagName.outputs.tag }} \ + --file ./Dockerfile . +