Skip to content

Commit

Permalink
Ability to push ARM/AMD64 Operator UI images to GHCR (#2426)
Browse files Browse the repository at this point in the history
* Updated to build for UI and push to GHCR
* Enable build for both Operator and Operator UI
  • Loading branch information
urashidmalik committed Feb 2, 2024
1 parent 375a467 commit 8a1b2f4
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/publish_ghcr_image.yaml
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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

3 changes: 2 additions & 1 deletion ui/Dockerfile
@@ -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
Expand Down

0 comments on commit 8a1b2f4

Please sign in to comment.