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 1313 steps :
1414 - uses : actions/checkout@v5
1515
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-
2116 - name : Set up QEMU
2217 uses : docker/setup-qemu-action@v3
2318
2621
2722 - name : Login to Docker Hub
2823 uses : docker/login-action@v3
24+ if : ${{ github.repository == 'movetokube/postgres-operator' }}
2925 with :
3026 username : ${{ secrets.DOCKER_USER }}
3127 password : ${{ secrets.DOCKER_TOKEN }}
@@ -37,14 +33,24 @@ jobs:
3733 username : ${{ github.repository_owner }}
3834 password : ${{ secrets.GITHUB_TOKEN }}
3935
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+
4049 - name : Build and push
4150 uses : docker/build-push-action@v6
4251 with :
4352 context : .
4453 platforms : linux/amd64,linux/arm64
4554 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