Ability to push ARM/AMD64 Operator UI images to GHCR (#2426)

* Updated to build for UI and push to GHCR
* Enable build for both Operator and Operator UI
This commit is contained in:
Umair Rashid Malik 2024-02-02 03:32:35 -08:00 committed by GitHub
parent 375a4679cd
commit 8a1b2f4f69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 21 additions and 2 deletions

View File

@ -3,6 +3,7 @@ name: Publish multiarch postgres-operator image on ghcr.io
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_NAME_UI: ${{ github.repository }}-ui
on:
push:
@ -30,7 +31,13 @@ jobs:
id: image
run: |
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}"
echo "NAME=$IMAGE" >> $GITHUB_OUTPUT
echo "NAME=${IMAGE,,}" >> $GITHUB_OUTPUT
- name: Define image name
id: image_ui
run: |
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME_UI }}:${GITHUB_REF/refs\/tags\//}"
echo "NAME=${IMAGE,,}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
@ -54,3 +61,14 @@ jobs:
build-args: BASE_IMAGE=alpine:3.15
tags: "${{ steps.image.outputs.NAME }}"
platforms: linux/amd64,linux/arm64
- name: Build and push multiarch image to ghcr for UI
uses: docker/build-push-action@v3
with:
context: ${{ github.workspace }}/ui
file: ${{ github.workspace }}/ui/Dockerfile
push: true
build-args: BASE_IMAGE=alpine:3.15
tags: "${{ steps.image_ui.outputs.NAME }}"
platforms: linux/amd64,linux/arm64

View File

@ -1,4 +1,5 @@
FROM registry.opensource.zalan.do/library/alpine-3.15:latest
ARG BASE_IMAGE=registry.opensource.zalan.do/library/alpine-3.15:latest
FROM ${BASE_IMAGE}
LABEL maintainer="Team ACID @ Zalando <team-acid@zalando.de>"
EXPOSE 8081