From ec8b6480eda7b4a09a462b215c84477dbf6604bc Mon Sep 17 00:00:00 2001 From: Kaspar <4711189+kjde@users.noreply.github.com> Date: Wed, 28 Jun 2023 23:01:31 +0200 Subject: [PATCH 01/17] Implemented arm64 builds --- .github/workflows/deploy-image.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 50052fd..e585b4f 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -50,7 +50,8 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: file: Dockerfile + platforms: linux/amd64,linux/arm64 context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} From d8b731f9172e2c2962b0413b1bcee966f8cc922e Mon Sep 17 00:00:00 2001 From: Kaspar <4711189+kjde@users.noreply.github.com> Date: Wed, 28 Jun 2023 23:05:20 +0200 Subject: [PATCH 02/17] test --- .github/workflows/deploy-image.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 50052fd..0b9a3b8 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -53,4 +53,5 @@ jobs: context: . push: true tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file + labels: ${{ steps.meta.outputs.labels }} + From 9f575f9b7a388b3db40d3544bc42d14dde1383ea Mon Sep 17 00:00:00 2001 From: Kaspar <4711189+kjde@users.noreply.github.com> Date: Wed, 28 Jun 2023 23:15:47 +0200 Subject: [PATCH 03/17] Update deploy-image.yml --- .github/workflows/deploy-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index e585b4f..fc9b28f 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -23,7 +23,7 @@ jobs: uses: actions/checkout@v2 - name: Log in to the Container registry - uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} @@ -47,7 +47,7 @@ jobs: # PASSWORD: ${{ secrets.MEGA_PASSWORD }} - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + uses: docker/build-push-action@v4 with: file: Dockerfile platforms: linux/amd64,linux/arm64 From 25fd45ec98f2091066a269b53b0cac1b13e6e4c6 Mon Sep 17 00:00:00 2001 From: Kaspar <4711189+kjde@users.noreply.github.com> Date: Wed, 28 Jun 2023 23:19:20 +0200 Subject: [PATCH 04/17] Update deploy-image.yml --- .github/workflows/deploy-image.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index fc9b28f..b4f080c 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -20,8 +20,8 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 - + uses: actions/checkout@v3 + - name: Log in to the Container registry uses: docker/login-action@v2 with: @@ -46,10 +46,15 @@ jobs: # USERNAME: ${{ secrets.MEGA_USERNAME }} # PASSWORD: ${{ secrets.MEGA_PASSWORD }} + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - name: Build and push Docker image uses: docker/build-push-action@v4 with: - file: Dockerfile platforms: linux/amd64,linux/arm64 context: . push: true From 8437993b1942aca92c845107e5994f51708ba9d6 Mon Sep 17 00:00:00 2001 From: Kaspar <4711189+kjde@users.noreply.github.com> Date: Wed, 28 Jun 2023 23:22:41 +0200 Subject: [PATCH 05/17] switch from alpine to bullseye --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 19bf444..0a4928c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM openjdk:17-alpine +FROM openjdk:17-bullseye ADD target/tibber-pulse-reader-1.0.0-SNAPSHOT.jar /tibber-pulse-reader.jar From d77107f18e351b79a5e15b04141f77eaf5a7ccf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 10:55:38 +0200 Subject: [PATCH 06/17] Build for Alpine --- .github/workflows/deploy-image.yml | 13 ++++++++++++- Dockerfile-Alpine | 5 +++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Dockerfile-Alpine diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index b4f080c..a9e20f8 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -31,7 +31,7 @@ jobs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + uses: docker/metadata-action@v4 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} @@ -57,6 +57,17 @@ jobs: with: platforms: linux/amd64,linux/arm64 context: . + file: ./Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + + - name: Build and push Docker image for Alpine + uses: docker/build-push-action@v4 + with: + platforms: linux/amd64 + context: . + file: ./Dockerfile-Alpine + push: true + tags: ${{ steps.meta.outputs.tags }}-alpine + labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile-Alpine b/Dockerfile-Alpine new file mode 100644 index 0000000..19bf444 --- /dev/null +++ b/Dockerfile-Alpine @@ -0,0 +1,5 @@ +FROM openjdk:17-alpine + +ADD target/tibber-pulse-reader-1.0.0-SNAPSHOT.jar /tibber-pulse-reader.jar + +ENTRYPOINT ["java","-XX:+UnlockExperimentalVMOptions","-XX:+UseContainerSupport","-jar","/tibber-pulse-reader.jar"] From a8ba999e9a533234a15f6bd4879000c5d7229b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 11:08:05 +0200 Subject: [PATCH 07/17] added latest tag --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index a9e20f8..b273915 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -59,7 +59,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }}, latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From 88e01f0708928fd293071021b40bc7c02df6e4b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 11:12:42 +0200 Subject: [PATCH 08/17] added latest --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index b273915..f610d14 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -59,7 +59,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}, latest + tags: ${{ steps.meta.outputs.tags }}, ${{ github.event.repository.name }}:latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From e9dc0c9cd25a0b72be00e058d231de03790ae69b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 11:30:30 +0200 Subject: [PATCH 09/17] reverted --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index f610d14..a9e20f8 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -59,7 +59,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}, ${{ github.event.repository.name }}:latest + tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From 7f34b769280ff75b365a6f5a751dc954e1496555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 11:42:20 +0200 Subject: [PATCH 10/17] added latest tag --- .github/workflows/deploy-image.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index a9e20f8..547bdef 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -4,8 +4,6 @@ on: push: branches: - master - tags: - - v* env: REGISTRY: ghcr.io @@ -59,7 +57,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }} + tags: ${{ steps.meta.outputs.tags }}, ${{ GITHUB_REPOSITORY }}:latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From e18300cbc68a05fb45a049e14f0344fb7e91ca91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 11:45:04 +0200 Subject: [PATCH 11/17] added latest tag --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 547bdef..94a5c39 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -57,7 +57,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}, ${{ GITHUB_REPOSITORY }}:latest + tags: ${{ steps.meta.outputs.tags }}, ${{ env.GITHUB_REPOSITORY }}:latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From 0f14f57c130a498dfcdf57a136cfe40f2e52e0b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 11:48:05 +0200 Subject: [PATCH 12/17] added latest tag --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 94a5c39..7d720f0 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -57,7 +57,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}, ${{ env.GITHUB_REPOSITORY }}:latest + tags: ${{ steps.meta.outputs.tags }}, ${GITHUB_REPOSITORY}:latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From 17d89badf7669c154213bff76ab093f3bd82ae9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 11:55:47 +0200 Subject: [PATCH 13/17] added latest tag --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 7d720f0..3c255b8 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -57,7 +57,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}, ${GITHUB_REPOSITORY}:latest + tags: ${{ steps.meta.outputs.tags }}, $GITHUB_REPOSITORY:latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From 63265d3f182d7cf6e7b70dc6d1bf52ac90c476b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 12:00:12 +0200 Subject: [PATCH 14/17] added latest tag --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 3c255b8..fe5d90e 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -57,7 +57,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}, $GITHUB_REPOSITORY:latest + tags: ${{ steps.meta.outputs.tags }}, ${{ github.repository }}:latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From 87cb6973a14af1858f98d69f478c805c04646b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 12:07:21 +0200 Subject: [PATCH 15/17] added latest tag --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index fe5d90e..bc64114 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -57,7 +57,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}, ${{ github.repository }}:latest + tags: ${{ steps.meta.outputs.tags }}, ghcr.io/${{ github.repository }}:latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From df15485e38b14dad3e5e609469763f82c6292f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaspar=20Jan=C3=9Fen?= Date: Fri, 7 Jul 2023 12:10:08 +0200 Subject: [PATCH 16/17] added latest tag --- .github/workflows/deploy-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index bc64114..8a42141 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -57,7 +57,7 @@ jobs: context: . file: ./Dockerfile push: true - tags: ${{ steps.meta.outputs.tags }}, ghcr.io/${{ github.repository }}:latest + tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ github.repository }}:latest labels: ${{ steps.meta.outputs.labels }} - name: Build and push Docker image for Alpine From 927b59bcdd042bb90687ab28d70d1ee36ae19cff Mon Sep 17 00:00:00 2001 From: Kaspar Janssen Date: Fri, 18 Aug 2023 22:00:25 +0200 Subject: [PATCH 17/17] build on tags added again --- .github/workflows/deploy-image.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/deploy-image.yml b/.github/workflows/deploy-image.yml index 8a42141..8a7a06c 100644 --- a/.github/workflows/deploy-image.yml +++ b/.github/workflows/deploy-image.yml @@ -4,6 +4,8 @@ on: push: branches: - master + tags: + - v* env: REGISTRY: ghcr.io