@@ -32,40 +32,53 @@ jobs:
3232 ref="${ref////-}"
3333 echo $ref
3434 echo ::set-output name=tag::$ref
35- - name : Build and push zookeeper Apache image
36- uses : docker/build-push-action@v1
37- if : ${{ startsWith(github.ref, 'refs/tags/zk') }}
35+ echo ::set-output name=created::$(date -u +'%Y-%m-%dT%H:%M:%SZ')
36+
37+ - name : Set up QEMU
38+ uses : docker/setup-qemu-action@v3
39+ - name : Set up Docker Buildx
40+ uses : docker/setup-buildx-action@v3
41+ - name : Login to DockerHub
42+ if : startsWith(github.ref, 'refs/tags/')
43+ uses : docker/login-action@v3
3844 with :
39- path : docker/zookeeper-image
4045 username : ${{ secrets.DOCKER_USERNAME }}
4146 password : ${{ secrets.DOCKER_PASSWORD }}
42- repository : adobe/zookeeper
43- tags : 3.8.3-apache-${{ steps.vars.outputs.tag }}
44- add_git_labels : true
45- always_pull : true
47+
48+ - name : Build and push zookeeper Apache image
49+ uses : docker/build-push-action@v5
50+ if : ${{ startsWith(github.ref, 'refs/tags/zk') }}
51+ with :
52+ context : docker/zookeeper-image
53+ platforms : linux/amd64,linux/arm64
54+ tags : adobe/zookeeper:3.8.3-apache-${{ steps.vars.outputs.tag }}
4655 push : ${{ startsWith(github.ref, 'refs/tags/zk') }}
56+ labels : |
57+ org.opencontainers.image.source=${{ github.event.repository.html_url }}
58+ org.opencontainers.image.created=${{ steps.prep.outputs.created }}
59+ org.opencontainers.image.revision=${{ github.sha }}
60+
4761 - name : Build and push zookeeper image
4862 if : ${{ !startsWith(github.ref, 'refs/tags/zk') }}
49- uses : docker/build-push-action@v1
63+ uses : docker/build-push-action@v5
5064 with :
51- path : docker
52- username : ${{ secrets.DOCKER_USERNAME }}
53- password : ${{ secrets.DOCKER_PASSWORD }}
54- repository : adobe/zookeeper
55- tags : 3.8.3-${{ steps.vars.outputs.tag }}
56- add_git_labels : true
57- always_pull : true
65+ context : docker
66+ platforms : linux/amd64,linux/arm64
67+ tags : adobe/zookeeper:3.8.3-${{ steps.vars.outputs.tag }}
5868 push : ${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/zk') }}
69+ labels : |
70+ org.opencontainers.image.source=${{ github.event.repository.html_url }}
71+ org.opencontainers.image.created=${{ steps.prep.outputs.created }}
72+ org.opencontainers.image.revision=${{ github.sha }}
73+
5974 - name : Build and push zookeeper-operator image
6075 if : ${{ !startsWith(github.ref, 'refs/tags/zk') }}
61- uses : docker/build-push-action@v1
76+ uses : docker/build-push-action@v5
6277 with :
63- dockerfile : Dockerfile
64- build_args : VERSION=${{ steps.vars.outputs.tag }},GIT_SHA=${{ github.sha }}
65- username : ${{ secrets.DOCKER_USERNAME }}
66- password : ${{ secrets.DOCKER_PASSWORD }}
67- repository : adobe/zookeeper-operator
68- tag_with_ref : true
69- add_git_labels : true
70- always_pull : true
78+ context : .
79+ tags : adobe/zookeeper-operator:${{ steps.vars.outputs.tag }}
7180 push : ${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/zk') }}
81+ labels : |
82+ org.opencontainers.image.source=${{ github.event.repository.html_url }}
83+ org.opencontainers.image.created=${{ steps.prep.outputs.created }}
84+ org.opencontainers.image.revision=${{ github.sha }}
0 commit comments