Skip to content

Commit

Permalink
Zookeeper image build for arm and x64
Browse files Browse the repository at this point in the history
  • Loading branch information
azun committed Mar 13, 2024
1 parent a2f682a commit d27fccf
Showing 1 changed file with 23 additions and 15 deletions.
38 changes: 23 additions & 15 deletions .github/workflows/build-push-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,46 @@ jobs:
ref="${ref////-}"
echo $ref
echo ::set-output name=tag::$ref
- name: Build and push zookeeper Apache image
uses: docker/build-push-action@v1
if: ${{ startsWith(github.ref, 'refs/tags/zk') }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
if: startsWith(github.ref, 'refs/tags/')
uses: docker/login-action@v3
with:
path: docker/zookeeper-image
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: adobe/zookeeper
tags: 3.8.3-apache-${{ steps.vars.outputs.tag }}

- name: Build and push zookeeper Apache image
uses: docker/build-push-action@v5
if: ${{ startsWith(github.ref, 'refs/tags/zk') }}
with:
context: docker/zookeeper-image
platforms: linux/amd64,linux/arm64
tags: adobe/zookeeper:3.8.3-apache-${{ steps.vars.outputs.tag }}
add_git_labels: true
always_pull: true
push: ${{ startsWith(github.ref, 'refs/tags/zk') }}

- name: Build and push zookeeper image
if: ${{ !startsWith(github.ref, 'refs/tags/zk') }}
uses: docker/build-push-action@v1
uses: docker/build-push-action@v5
with:
path: docker
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: adobe/zookeeper
tags: 3.8.3-${{ steps.vars.outputs.tag }}
context: docker
platforms: linux/amd64,linux/arm64
tags: adobe/zookeeper:3.8.3-${{ steps.vars.outputs.tag }}
add_git_labels: true
always_pull: true
push: ${{ startsWith(github.ref, 'refs/tags/') && !startsWith(github.ref, 'refs/tags/zk') }}

- name: Build and push zookeeper-operator image
if: ${{ !startsWith(github.ref, 'refs/tags/zk') }}
uses: docker/build-push-action@v1
uses: docker/build-push-action@v5
with:
dockerfile: Dockerfile
build_args: VERSION=${{ steps.vars.outputs.tag }},GIT_SHA=${{ github.sha }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: adobe/zookeeper-operator
tag_with_ref: true
add_git_labels: true
Expand Down

0 comments on commit d27fccf

Please sign in to comment.