-
Notifications
You must be signed in to change notification settings - Fork 2
88 lines (84 loc) · 3.45 KB
/
container.yml
File metadata and controls
88 lines (84 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Container
on:
workflow_dispatch:
permissions:
contents: write
jobs:
build-native-image:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, arm64]
env:
MVN: ./mvnw --show-version --batch-mode --no-transfer-progress
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
java-version: 25
distribution: temurin
cache: maven
- run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- name: Build native binary for ${{ matrix.arch }}
run: $MVN install -P prod,op,standalone,native -Dquarkus.native.container-build=true -Dquarkus.native.container-runtime-options=--platform=linux/${{ matrix.arch }}
- uses: actions/upload-artifact@v7
with:
name: native-binary-${{ matrix.arch }}
path: op/standalone/target/*-runner
retention-days: 1
build-image:
needs: build-native-image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static
- run: podman --version
- uses: actions/download-artifact@v8
with:
name: native-binary-amd64
path: op/standalone/target/native-amd64
- uses: actions/download-artifact@v8
with:
name: native-binary-arm64
path: op/standalone/target/native-arm64
- uses: redhat-actions/podman-login@v1
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
- name: Build multi-arch image
run: |
podman manifest create quay.io/halconsole/hal-op:latest
podman build \
--platform linux/amd64 \
--manifest quay.io/halconsole/hal-op:latest \
--label maintainer=hpehl@redhat.com \
--label org.opencontainers.image.authors=hpehl@redhat.com \
--label org.opencontainers.image.description="HAL console on premise" \
--label org.opencontainers.image.licenses=Apache-2.0 \
--label org.opencontainers.image.source=https://github.com/hal/foundation \
--label org.opencontainers.image.title="HAL On Premise" \
--label org.opencontainers.image.url=https://hal.github.io \
--label org.opencontainers.image.vendor="Red Hat" \
--build-arg BINARY_PATH=target/native-amd64 \
-f op/standalone/src/main/docker/Dockerfile.native-micro \
op/standalone
podman build \
--platform linux/arm64 \
--manifest quay.io/halconsole/hal-op:latest \
--label maintainer=hpehl@redhat.com \
--label org.opencontainers.image.authors=hpehl@redhat.com \
--label org.opencontainers.image.description="HAL console on premise" \
--label org.opencontainers.image.licenses=Apache-2.0 \
--label org.opencontainers.image.source=https://github.com/hal/foundation \
--label org.opencontainers.image.title="HAL On Premise" \
--label org.opencontainers.image.url=https://hal.github.io \
--label org.opencontainers.image.vendor="Red Hat" \
--build-arg BINARY_PATH=target/native-arm64 \
-f op/standalone/src/main/docker/Dockerfile.native-micro \
op/standalone
podman manifest push quay.io/halconsole/hal-op:latest