1- name : Publish multiarch postgres-operator image on ghcr.io
1+ name : Publish multiarch postgres-operator images on ghcr.io
22
33env :
44 REGISTRY : ghcr.io
99 push :
1010 tags :
1111 - ' *'
12+
1213jobs :
1314 publish :
1415 name : Build, test and push image
@@ -30,14 +31,20 @@ jobs:
3031 - name : Define image name
3132 id : image
3233 run : |
33- IMAGE ="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}"
34- echo "NAME=${IMAGE,,} " >> $GITHUB_OUTPUT
34+ OPERATOR_IMAGE ="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${GITHUB_REF/refs\/tags\//}"
35+ echo "OPERATOR_IMAGE=$OPERATOR_IMAGE " >> $GITHUB_OUTPUT
3536
36- - name : Define image name
37+ - name : Define UI image name
3738 id : image_ui
3839 run : |
39- IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME_UI }}:${GITHUB_REF/refs\/tags\//}"
40- echo "NAME=${IMAGE,,}" >> $GITHUB_OUTPUT
40+ UI_IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME_UI }}:${GITHUB_REF/refs\/tags\//}"
41+ echo "UI_IMAGE=$UI_IMAGE" >> $GITHUB_OUTPUT
42+
43+ - name : Define logical backup image name
44+ id : image_lb
45+ run : |
46+ BACKUP_IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/logical-backup:${GITHUB_REF_NAME}"
47+ echo "BACKUP_IMAGE=$BACKUP_IMAGE" >> $GITHUB_OUTPUT
4148
4249 - name : Set up QEMU
4350 uses : docker/setup-qemu-action@v2
@@ -52,23 +59,30 @@ jobs:
5259 username : ${{ github.actor }}
5360 password : ${{ secrets.GITHUB_TOKEN }}
5461
55- - name : Build and push multiarch image to ghcr
62+ - name : Build and push multiarch operator image to ghcr
5663 uses : docker/build-push-action@v3
5764 with :
5865 context : .
5966 file : docker/Dockerfile
6067 push : true
6168 build-args : BASE_IMAGE=alpine:3.15
62- tags : " ${{ steps.image.outputs.NAME }}"
69+ tags : " ${{ steps.image.outputs.OPERATOR_IMAGE }}"
6370 platforms : linux/amd64,linux/arm64
6471
65- - name : Build and push multiarch image to ghcr for UI
72+ - name : Build and push multiarch ui image to ghcr
6673 uses : docker/build-push-action@v3
6774 with :
68- context : ${{ github.workspace }}/ui
69- file : ${{ github.workspace }}/ui/Dockerfile
75+ context : ui
7076 push : true
7177 build-args : BASE_IMAGE=alpine:3.15
72- tags : " ${{ steps.image_ui.outputs.NAME }}"
78+ tags : " ${{ steps.image_ui.outputs.UI_IMAGE }}"
7379 platforms : linux/amd64,linux/arm64
7480
81+ - name : Build and push multiarch logical-backup image to ghcr
82+ uses : docker/build-push-action@v3
83+ with :
84+ context : docker/logical-backup
85+ push : true
86+ build-args : BASE_IMAGE=ubuntu:22.04
87+ tags : " ${{ steps.image_lb.outputs.BACKUP_IMAGE }}"
88+ platforms : linux/amd64,linux/arm64
0 commit comments