File tree 1 file changed +58
-0
lines changed
1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Push Docker Image
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - js-flyio-dev
7
+
8
+ env :
9
+ REGISTRY : docker.io
10
+ IMAGE_NAME : flyio/percona-postgresql-operator
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+ permissions :
16
+ contents : read
17
+ packages : write
18
+
19
+ steps :
20
+ - name : Checkout repository
21
+ uses : actions/checkout@v4
22
+ with :
23
+ fetch-depth : 0 # Needed for git describe
24
+
25
+ - name : Set up QEMU
26
+ uses : docker/setup-qemu-action@v3
27
+
28
+ - name : Set up Docker Buildx
29
+ uses : docker/setup-buildx-action@v3
30
+
31
+ - name : Log in to Docker Hub
32
+ uses : docker/login-action@v3
33
+ with :
34
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
35
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
36
+
37
+ - name : Extract metadata (tags, labels) for Docker
38
+ id : meta
39
+ uses : docker/metadata-action@v5
40
+ with :
41
+ images : ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
42
+ tags : |
43
+ type=sha,format=short
44
+
45
+ - name : Get PGMonitor
46
+ run : make get-pgmonitor
47
+
48
+ - name : Build and push Docker image
49
+ uses : docker/build-push-action@v5
50
+ with :
51
+ context : .
52
+ file : ./build/postgres-operator/Dockerfile
53
+ push : true
54
+ platforms : linux/amd64
55
+ tags : ${{ steps.meta.outputs.tags }}
56
+ labels : ${{ steps.meta.outputs.labels }}
57
+ cache-from : type=gha
58
+ cache-to : type=gha,mode=max
You can’t perform that action at this time.
0 commit comments