Skip to content

Commit 7a24959

Browse files
authored
Adding amd/arm64 for the docker image artifacts
1 parent f595930 commit 7a24959

2 files changed

Lines changed: 12 additions & 16 deletions

File tree

.github/workflows/release.yaml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,14 @@ jobs:
4949
- name: Install Ginkgo
5050
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
5151

52-
- name: Build and Push
53-
run: |
54-
make docker-build docker-push
55-
56-
docker tag wandb/controller:latest wandb/controller:${{ steps.release.outputs.new_release_version }}
57-
docker push wandb/controller:${{ steps.release.outputs.new_release_version }}
58-
59-
docker tag wandb/controller:latest wandb/controller:${{ steps.release.outputs.new_release_major_version }}.${{ steps.release.outputs.new_release_minor_version }}
60-
docker push wandb/controller:${{ steps.release.outputs.new_release_major_version }}.${{ steps.release.outputs.new_release_minor_version }}
61-
62-
docker tag wandb/controller:latest wandb/controller:${{ steps.release.outputs.new_release_major_version }}
63-
docker push wandb/controller:${{ steps.release.outputs.new_release_major_version }}
64-
env:
65-
IMAGE_TAG_BASE: wandb/controller
66-
VERSION: latest
52+
- name: Build and Push Multi-arch Images
53+
uses: docker/build-push-action@v4
54+
with:
55+
context: .
56+
push: true
57+
platforms: linux/amd64,linux/arm64
58+
tags: |
59+
sqaisar/wandb-operator:latest
60+
sqaisar/wandb-operator:${{ steps.release.outputs.new_release_version }}
61+
sqaisar/wandb-operator:${{ steps.release.outputs.new_release_major_version }}.${{ steps.release.outputs.new_release_minor_version }}
62+
sqaisar/wandb-operator:${{ steps.release.outputs.new_release_major_version }}

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ COPY controllers/ controllers/
2525
# was called. For example, if we call make docker-build in a local env which has the Apple Silicon M1 SO
2626
# the docker BUILDPLATFORM arg will be linux/arm64 when for Apple x86 it will be linux/amd64. Therefore,
2727
# by leaving it empty we can ensure that the container and binary shipped on it will have the same platform.
28-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go
28+
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -a -o manager main.go
2929

3030
# Create a helm cache directory, set group ownership and permissions, and apply the sticky bit
3131
RUN mkdir -p /helm/.cache/helm /helm/.config/helm /helm/.local/share/helm && chmod -R 1777 /helm

0 commit comments

Comments
 (0)