mirror of
https://github.com/zalando/postgres-operator.git
synced 2026-09-30 21:09:30 +02:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user