diff --git a/.github/workflows/docker-publish.yaml b/.github/workflows/docker-publish.yaml index e9a5e6a..b04a072 100644 --- a/.github/workflows/docker-publish.yaml +++ b/.github/workflows/docker-publish.yaml @@ -10,10 +10,10 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Docker meta id: meta - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: # list of Docker images to use as base name for tags images: | @@ -28,18 +28,19 @@ jobs: type=semver,pattern={{major}} type=sha - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v2 - name: Login to DockerHub - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 diff --git a/Dockerfile b/Dockerfile index 52e8ab3..273787b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Build the manager binary -FROM golang:1.17 as builder +FROM --platform=$BUILDPLATFORM golang:1.17 as builder WORKDIR /workspace # Copy the Go Modules manifests @@ -15,8 +15,10 @@ COPY apis/ apis/ COPY utils/ utils/ COPY controllers/ controllers/ +ARG TARGETOS TARGETARCH + # Build -RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -a -o manager main.go +RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -a -o manager main.go # Use distroless as minimal base image to package the manager binary # Refer to /~https://github.com/GoogleContainerTools/distroless for more details diff --git a/charts/eck-custom-resources-operator/Chart.yaml b/charts/eck-custom-resources-operator/Chart.yaml index 62e6f82..a4ea5be 100644 --- a/charts/eck-custom-resources-operator/Chart.yaml +++ b/charts/eck-custom-resources-operator/Chart.yaml @@ -9,5 +9,5 @@ maintainers: email: marek@xco.sk url: /~https://github.com/xco-sk type: application -version: 0.5.4 -appVersion: 0.5.4 +version: 0.5.5 +appVersion: 0.5.5 diff --git a/charts/eck-custom-resources-operator/README.md b/charts/eck-custom-resources-operator/README.md index bfef724..e7539d6 100644 --- a/charts/eck-custom-resources-operator/README.md +++ b/charts/eck-custom-resources-operator/README.md @@ -1,6 +1,6 @@ # Helm chart for eck-custom-resources -![Version: 0.5.4](https://img.shields.io/badge/Version-0.5.4-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.4](https://img.shields.io/badge/AppVersion-0.5.4-informational?style=flat-square) +![Version: 0.5.5](https://img.shields.io/badge/Version-0.5.5-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.5.5](https://img.shields.io/badge/AppVersion-0.5.5-informational?style=flat-square) Helm chart for eck-custom-resources operator