Skip to content

Commit

Permalink
Merge pull request #17 from kjde/master
Browse files Browse the repository at this point in the history
ARM64 builds
  • Loading branch information
micw committed Sep 1, 2023
2 parents c2cc3b5 + 927b59b commit e57e922
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches:
- master
tags:
- v*
tags:
- v*

env:
REGISTRY: ghcr.io
Expand All @@ -20,18 +20,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2

uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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 }}

Expand All @@ -46,11 +46,28 @@ 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@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}, ${{ env.REGISTRY }}/${{ github.repository }}:latest
labels: ${{ steps.meta.outputs.labels }}

- name: Build and push Docker image for Alpine
uses: docker/build-push-action@v4
with:
file: Dockerfile
platforms: linux/amd64
context: .
file: ./Dockerfile-Alpine
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}-alpine
labels: ${{ steps.meta.outputs.labels }}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 5 additions & 0 deletions Dockerfile-Alpine
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit e57e922

Please sign in to comment.