From 381a969a7dc68b3084a3eab3d5489776e6b4dd19 Mon Sep 17 00:00:00 2001 From: Matej Vasek Date: Tue, 30 Jan 2024 18:22:35 +0100 Subject: [PATCH] WIP Signed-off-by: Matej Vasek --- .github/workflows/build-images.yaml | 11 +++++++++-- Dockerfile | 13 +++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index a455731846..f6a7dbcd75 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -7,5 +7,12 @@ jobs: name: Build job runs-on: ubuntu-latest steps: - - name: Run docker - run: docker buildx --help + - uses: ./.github/composite/go-setup + - name: Build binaries + run: make func_linux_amd64 func_linux_arm64 func_linux_ppc64le func_linux_s390x + - name: Build images + run: | + docker buildx build . \ + --platform=linux/ppc64le,linux/s390x,linux/amd64,linux/arm64 \ + --push \ + -t "ttl.sh/knative-func/test-img-$(uuid):10m" diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..0e65a5d471 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +#FROM --platform=$BUILDPLATFORM golang:1.21.6-alpine3.19 AS builder +#ARG BUILDPLATFORM +#for now we use localy built binaries + +FROM alpine/socat:latest + +ARG TARGETPLATFORM +ARG TARGETARCH +ARG TARGETOS + +RUN echo "func_${TARGETOS}_${TARGETARCH}" + +COPY func_${TARGETOS}_${TARGETARCH} /bin/