diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 07c1b0b..9fc7ded 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -1,6 +1,8 @@ name: Docker Image CI -on: [push] +on: + push: + branches: [ main ] jobs: buildx: @@ -17,5 +19,24 @@ jobs: id: buildx uses: docker/setup-buildx-action@v1 - - name: Available platforms - run: echo ${{ steps.buildx.outputs.platforms }} + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push linux/amd64 + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/amd64 + push: true + tags: noisedash/noisedash:latest + - + name: Build and push linux/arm/v7 + uses: docker/build-push-action@v2 + with: + context: . + platforms: linux/arm/v7 + push: true + tags: noisedash/noisedash:latest-armv7