Skip to content

Commit

Permalink
Multi-platform images
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Edgar <[email protected]>
  • Loading branch information
MikeEdgar committed Jun 5, 2024
1 parent 6f81aff commit 51e1c63
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
18 changes: 17 additions & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ jobs:
restore-keys: |
${{ runner.os }}-maven-
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Test
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Expand All @@ -40,7 +46,10 @@ jobs:
#
# See: https://quarkus.io/guides/tests-with-coverage#coverage-for-integration-tests
#
mvn verify -Pdocker -B --no-transfer-progress -Dquarkus.package.write-transformed-bytecode-to-build-output=true -f api/pom.xml
mvn verify -Pdocker -B --no-transfer-progress \
-Dquarkus.package.write-transformed-bytecode-to-build-output=true \
-Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64 \
-f api/pom.xml
- name: Archive Results
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -72,10 +81,17 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build UI Image
uses: docker/build-push-action@v5
with:
context: ui/
platforms: linux/amd64,linux/arm64
push: false
tags: |
eyefloaters/ui:latest
11 changes: 9 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
java-version: '17'
distribution: 'adopt'

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and Push API Image
run: |
git config --global user.name "github-actions[bot]"
Expand All @@ -49,19 +55,20 @@ jobs:
export QUARKUS_CONTAINER_IMAGE_ADDITIONAL_TAGS=latest
export GIT_REVISION=$(git rev-parse --short release)
# Build and push the release images using the commit tagged in `release:prepare`
mvn -B -P docker release:perform -f api/pom.xml
mvn -B -P docker release:perform -Dquarkus.docker.buildx.platform=linux/amd64,linux/arm64 -f api/pom.xml
- name: Login to Quay
uses: docker/login-action@v3
with:
registry: "${{ secrets.IMAGE_REPO_HOSTNAME }}"
username: "${{ secrets.IMAGE_REPO_USERNAME }}"
password: "${{ secrets.IMAGE_REPO_PASSWORD }}"

- name: Build and Push UI Image
uses: docker/build-push-action@v5
with:
context: ui/
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.IMAGE_REPO_HOSTNAME }}/${{ secrets.IMAGE_REPO_NAMESPACE }}/console-ui:${{steps.metadata.outputs.current-version}}
Expand Down

0 comments on commit 51e1c63

Please sign in to comment.