From 56ec5c5aa9450c2373af9f5c2e1862624f7dd0d9 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Fri, 16 Feb 2024 00:46:42 +0100 Subject: [PATCH] Updated the release.yml workflow --- .github/workflows/release.yml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67aa784..83992f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,14 @@ jobs: java-version: '8' distribution: 'adopt' + - name: Set up QEMU + uses: docker/setup-qemu-action@master + with: + platforms: all + + - name: Set up Docker Build + uses: docker/setup-buildx-action@v2 + - name: Set up Node.js uses: actions/setup-node@v3 with: @@ -42,4 +50,19 @@ jobs: prerelease: false title: Release ${{ steps.get_version.outputs.version }} files: | - ./target/${{ steps.get_artifact_id.outputs.name }}-${{ steps.get_version.outputs.version }}.jar \ No newline at end of file + ./target/${{ steps.get_artifact_id.outputs.name }}-${{ steps.get_version.outputs.version }}.jar + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + platforms: linux/amd64,linux/arm64,linux/arm/v7 + tags: | + germannewsmaker/mcdash:latest + germannewsmaker/mcdash:${{ steps.get_version.outputs.version }} \ No newline at end of file