File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Push Image
2
+ on :
3
+ push :
4
+ branches :
5
+ - ' main'
6
+
7
+ env :
8
+ IMAGE_NAME : cli-java
9
+ IMAGE_REGISTRY : quay.io
10
+ IMAGE_NAMESPACE : rhmessagingqe
11
+
12
+ jobs :
13
+ build :
14
+ name : Build and push image
15
+ runs-on : ubuntu-22.04
16
+
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+
20
+ - name : Set up QEMU
21
+ uses : docker/setup-qemu-action@v2
22
+
23
+ - name : Build Image
24
+ id : build-image
25
+ uses : redhat-actions/buildah-build@v2
26
+ with :
27
+ image : ${{ env.IMAGE_NAME }}
28
+ tags : latest ${{ github.sha }} ${{ github.ref_name }}
29
+ archs : amd64, arm64, ppc64le, s390x
30
+ containerfiles : |
31
+ ./Dockerfile
32
+
33
+ - name : Push To quay.io
34
+ id : push-to-quay
35
+ uses : redhat-actions/push-to-registry@v2
36
+ with :
37
+ image : ${{ steps.build-image.outputs.image }}
38
+ tags : ${{ steps.build-image.outputs.tags }}
39
+ registry : ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_NAMESPACE }}
40
+ username : ${{ secrets.QUAY_USER }}
41
+ password : ${{ secrets.QUAY_TOKEN }}
42
+
43
+ - name : Print images URL
44
+ run : echo "Images pushed to ${{ steps.push-to-quay.outputs.registry-paths }}"
You can’t perform that action at this time.
0 commit comments