diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c52198a..e3f9226 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -1,4 +1,4 @@ -name: Build and Push Image +name: Build and Push Multi-Arch Image on: push: @@ -12,7 +12,7 @@ env: jobs: build: - name: Build and push image + name: Build and push multi-arch image runs-on: ubuntu-22.04 steps: @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v4 - - name: Build Image + - name: Build Multi-Arch Image id: build-image uses: redhat-actions/buildah-build@v2 with: @@ -33,6 +33,9 @@ jobs: tags: | latest ${{ github.sha }} + archs: | + amd64 + arm64 containerfiles: | ./Dockerfile diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 9e9b478..998219d 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: Build and Push Versioned Image +name: Build and Push Versioned Multi-Arch Image on: release: @@ -11,7 +11,7 @@ env: jobs: release: - name: Build and push versioned image + name: Build and push versioned multi-arch image runs-on: ubuntu-22.04 steps: @@ -27,13 +27,16 @@ jobs: - uses: actions/checkout@v4 - - name: Build Image for Release + - name: Build Multi-Arch Image for Release id: build-release-image uses: redhat-actions/buildah-build@v2 with: image: quay.io/kuadrant/console-plugin tags: | ${{ github.event.release.name }} + archs: | + amd64 + arm64 containerfiles: | ./Dockerfile diff --git a/Dockerfile b/Dockerfile index 46a8192..d568f14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,15 @@ -FROM registry.access.redhat.com/ubi9/nodejs-20 AS build +FROM registry.access.redhat.com/ubi9/nodejs-20:latest AS build USER root -RUN command -v yarn || npm i -g yarn +RUN dnf update -y && dnf upgrade -y && \ + command -v yarn || npm i -g yarn ADD . /usr/src/app WORKDIR /usr/src/app RUN yarn install && yarn build -FROM registry.access.redhat.com/ubi9/nginx-124:1-10 +FROM registry.access.redhat.com/ubi9/nginx-124:latest +USER root +RUN dnf update -y && dnf upgrade -y COPY --from=build /usr/src/app/dist /usr/share/nginx/html