Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ on:

jobs:
build:
# To run of Github-hosted runners, uncomment the line below and comment out the self-hosted runner line.
# runs-on: ubuntu-latest
# Use a self-hosted runner to ensure the necessary environment like sonarqube.
runs-on: self-hosted
# Native per-arch builds on dedicated ARC scale sets (no QEMU/binfmt):
# amd64 -> ebpro-org (x64 node), arm64 -> ebpro-org-arm (arm64 node).
# Each leg builds its own platform natively; the manifest job assembles
# the multi-arch manifest list registry-side (docker buildx imagetools).
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
runs-on: ${{ matrix.arch == 'arm64' && 'ebpro-org-arm' || 'ebpro-org' }}
timeout-minutes: 30

steps:
Comment on lines +20 to 24
- uses: actions/checkout@v4
Expand All @@ -38,15 +44,40 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and Push Multi-arch Image
- name: Build and Push Image (native ${{ matrix.arch }})
run: |
# Get the timestamp of the latest commit
TIMESTAMP=$(git log -1 --format=%cI)
./mvnw clean package -Dproject.build.outputTimestamp=$TIMESTAMP \
-Pjvm \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.registry=docker.io \
-Dquarkus.jib.platforms=linux/amd64,linux/arm64
-Dquarkus.jib.platforms=linux/${{ matrix.arch }} \
-Dquarkus.container-image.tag=${GITHUB_SHA}-${{ matrix.arch }}

manifest:
# Assemble the multi-arch manifest list registry-side: no image is pulled
# or re-pushed locally, so this works on any arch and needs no QEMU.
needs: build
runs-on: ebpro-org
timeout-minutes: 10

steps:
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Create multi-arch manifest
run: |
docker buildx imagetools create \
-t docker.io/brunoe/product-catalog:${GITHUB_SHA} \
-t docker.io/brunoe/product-catalog:latest \
docker.io/brunoe/product-catalog:${GITHUB_SHA}-amd64 \
docker.io/brunoe/product-catalog:${GITHUB_SHA}-arm64
- name: Verify manifest
run: |
docker buildx imagetools inspect docker.io/brunoe/product-catalog:${GITHUB_SHA}

deploy-docs:
runs-on: ubuntu-latest
Expand Down
Loading