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/