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:
parent
375a4679cd
commit
8a1b2f4f69
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue