1
- name : Publish multiarch postgres-operator image on ghcr.io
1
+ name : Publish multiarch postgres-operator images on ghcr.io
2
2
3
3
env :
4
4
REGISTRY : ghcr.io
9
9
push :
10
10
tags :
11
11
- ' *'
12
+
12
13
jobs :
13
14
publish :
14
15
name : Build, test and push image
@@ -30,14 +31,20 @@ jobs:
30
31
- name : Define image name
31
32
id : image
32
33
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
35
36
36
- - name : Define image name
37
+ - name : Define UI image name
37
38
id : image_ui
38
39
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
41
48
42
49
- name : Set up QEMU
43
50
uses : docker/setup-qemu-action@v2
@@ -52,23 +59,30 @@ jobs:
52
59
username : ${{ github.actor }}
53
60
password : ${{ secrets.GITHUB_TOKEN }}
54
61
55
- - name : Build and push multiarch image to ghcr
62
+ - name : Build and push multiarch operator image to ghcr
56
63
uses : docker/build-push-action@v3
57
64
with :
58
65
context : .
59
66
file : docker/Dockerfile
60
67
push : true
61
68
build-args : BASE_IMAGE=alpine:3.15
62
- tags : " ${{ steps.image.outputs.NAME }}"
69
+ tags : " ${{ steps.image.outputs.OPERATOR_IMAGE }}"
63
70
platforms : linux/amd64,linux/arm64
64
71
65
- - name : Build and push multiarch image to ghcr for UI
72
+ - name : Build and push multiarch ui image to ghcr
66
73
uses : docker/build-push-action@v3
67
74
with :
68
- context : ${{ github.workspace }}/ui
69
- file : ${{ github.workspace }}/ui/Dockerfile
75
+ context : ui
70
76
push : true
71
77
build-args : BASE_IMAGE=alpine:3.15
72
- tags : " ${{ steps.image_ui.outputs.NAME }}"
78
+ tags : " ${{ steps.image_ui.outputs.UI_IMAGE }}"
73
79
platforms : linux/amd64,linux/arm64
74
80
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