Skip to content

Commit

Permalink
Build multiarch image for quarkus app
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuzikar committed Aug 20, 2024
1 parent 54d8c27 commit 702326f
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
push:
branches:
- main
- multiarch-build
paths-ignore:
- '**.md'

Expand All @@ -31,7 +32,11 @@ jobs:
cache: 'maven'
- name: Build
run: |
mvn --batch-mode --no-transfer-progress install -Djkube.build.strategy=docker
mvn --batch-mode --no-transfer-progress install \
-Dquarkus.jib.base-jvm-image=registry.access.redhat.com/ubi8/openjdk-${{matrix.java}}-runtime:latest \
-Dquarkus.jib.platforms=linux/amd64,linux/arm64,linux/ppc64le,linux/s390x \
-Dquarkus.container-image.push=false \
-Djkube.build.strategy=docker
- name: Push image to Quay.io
if: github.event_name == 'push'
env:
Expand All @@ -40,13 +45,17 @@ jobs:
run: |
docker login --help
docker login -u $USERNAME -p $PASSWORD quay.io
docker tag quay.io/hawtio/hawtio-online-example-camel-quarkus:latest quay.io/hawtio/hawtio-online-example-camel-quarkus:${{matrix.java}}
mvn --batch-mode --no-transfer-progress install \
-Dquarkus.jib.base-jvm-image=registry.access.redhat.com/ubi8/openjdk-${{matrix.java}}-runtime:latest \
-Dquarkus.jib.platforms=linux/amd64,linux/arm64,linux/ppc64le,linux/s390x \
-Dquarkus.container-image.tag=${{ matrix.java }} \
-Dquarkus.container-image.push=true \
-Djkube.build.strategy=docker
docker tag quay.io/hawtio/hawtio-online-example-camel-springboot:latest quay.io/hawtio/hawtio-online-example-camel-springboot:${{matrix.java}}
docker push quay.io/hawtio/hawtio-online-example-camel-quarkus:${{matrix.java}}
docker push quay.io/hawtio/hawtio-online-example-camel-springboot:${{matrix.java}}
if [[ "${{matrix.java}}" == "21" ]]; then
docker push quay.io/hawtio/hawtio-online-example-camel-quarkus:latest
docker buildx imagetools create -t quay.io/hawtio/hawtio-online-example-camel-quarkus:latest quay.io/hawtio/hawtio-online-example-camel-quarkus:${{ matrix.java }}
docker push quay.io/hawtio/hawtio-online-example-camel-springboot:latest
fi

0 comments on commit 702326f

Please sign in to comment.