diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 2b044a41..6fb580cb 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -24,9 +24,26 @@ jobs: run: | echo "app_ver=$(mvn -B help:evaluate -Dexpression=project.version -q -DforceStdout)" echo "app_ver=$(mvn -B help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV + + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + +# Docker hub action + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Build with Maven - run: mvn -B clean integration-test package assembly:single docker:build + run: mvn -B clean integration-test package assembly:single docker:build docker:push # github_release: - @@ -40,19 +57,7 @@ jobs: commit: "master" generateReleaseNotes: true -# Docker hub action - - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: push snapshot version - run: | - echo publishing docker container $app_ver - docker push docker.io/obsidiandynamics/kafdrop:$app_ver - name: push latest if it's a release if: ${{ ! endsWith( env.app_ver, '-SNAPSHOT' ) }} - run: docker push docker.io/obsidiandynamics/kafdrop:latest + run: docker buildx imagetools create docker.io/obsidiandynamics/kafdrop:$app_ver --tag docker.io/obsidiandynamics/kafdrop:latest diff --git a/pom.xml b/pom.xml index ff8eb908..59e155ee 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,7 @@ 3.25.5 1.20.3 7.7.1 + linux/amd64,linux/arm64 @@ -239,24 +240,29 @@ - com.spotify + io.fabric8 docker-maven-plugin - 1.2.2 + 0.45.0 - obsidiandynamics/kafdrop - true - ${project.build.directory}/docker-ready - - ${project.version} - latest - - - - / - ${project.build.directory} - ${project.build.finalName}-bin.tar.gz - - + + + obsidiandynamics/kafdrop:${project.version} + + + + artifact + + + + + ${docker.platforms} + + + ${project.build.directory}/docker-ready + true + + + diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index db81925a..7e2ca4c7 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -1,7 +1,7 @@ FROM eclipse-temurin:17.0.13_11-jdk ADD kafdrop.sh / -ADD kafdrop*tar.gz / +ADD maven/ /kafdrop/ RUN chmod +x /kafdrop.sh