File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change 13
13
steps :
14
14
- uses : actions/checkout@v5
15
15
16
- - name : Generate Docker Tag
17
- run : |
18
- echo ${{ github.ref }} | cut -d '/' -f 3 > DOCKER_TAG
19
- echo "DOCKER_TAG=$(cat DOCKER_TAG)" >> $GITHUB_ENV
20
-
21
16
- name : Set up QEMU
22
17
uses : docker/setup-qemu-action@v3
23
18
26
21
27
22
- name : Login to Docker Hub
28
23
uses : docker/login-action@v3
24
+ if : ${{ github.repository == 'movetokube/postgres-operator' }}
29
25
with :
30
26
username : ${{ secrets.DOCKER_USER }}
31
27
password : ${{ secrets.DOCKER_TOKEN }}
@@ -37,14 +33,24 @@ jobs:
37
33
username : ${{ github.repository_owner }}
38
34
password : ${{ secrets.GITHUB_TOKEN }}
39
35
36
+ - name : Docker meta
37
+ id : meta
38
+ uses : docker/metadata-action@v5
39
+ with :
40
+ images : |
41
+ ghcr.io/${{ github.repository }}
42
+ movetokube/postgres-operator,enable=${{ github.repository == 'movetokube/postgres-operator' }}
43
+ tags : |
44
+ type=ref,event=branch
45
+ type=ref,event=pr
46
+ type=semver
47
+ type=sha
48
+
40
49
- name : Build and push
41
50
uses : docker/build-push-action@v6
42
51
with :
43
52
context : .
44
53
platforms : linux/amd64,linux/arm64
45
54
push : true
46
- tags : |
47
- ghcr.io/movetokube/postgres-operator:latest
48
- ghcr.io/movetokube/postgres-operator:${{ env.DOCKER_TAG }}
49
- movetokube/postgres-operator:${{ env.DOCKER_TAG }}
50
- movetokube/postgres-operator:latest
55
+ tags : ${{ steps.meta.outputs.tags }}
56
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments