Skip to content

Commit c5ccac5

Browse files
authored
Merge pull request #25 from negz/continuous
Don't build an amd64 binary in the arm64 image
2 parents 46f2fbc + 1ec551e commit c5ccac5

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ jobs:
9595
target: image
9696
build-args:
9797
GO_VERSION=${{ env.GO_VERSION }}
98-
outputs: type=docker,dest=runtime.tar
98+
outputs: type=docker,dest=runtime-${{ matrix.arch }}.tar
9999

100100
- name: Setup the Crossplane CLI
101101
run: "curl -sL https://raw.githubusercontent.com/crossplane/crossplane/master/install.sh | sh"
102102

103103
- name: Build Package
104-
run: ./crossplane xpkg build --package-file=${{ matrix.arch }}.xpkg --package-root=package/ --embed-runtime-image-tarball=runtime.tar
104+
run: ./crossplane xpkg build --package-file=${{ matrix.arch }}.xpkg --package-root=package/ --embed-runtime-image-tarball=runtime-${{ matrix.arch }}.tar
105105

106106
- name: Upload Single-Platform Package
107107
uses: actions/upload-artifact@v3

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
# We use the latest Go 1.x version unless asked to use something else.
44
ARG GO_VERSION=1
5-
ARG TARGETOS
6-
ARG TARGETARCH
75

86
# Setup the base environment.
97
FROM --platform=${BUILDPLATFORM} golang:${GO_VERSION} AS base
@@ -16,6 +14,8 @@ RUN --mount=type=cache,target=/go/pkg/mod go mod download
1614

1715
# Build the Function.
1816
FROM base AS build
17+
ARG TARGETOS
18+
ARG TARGETARCH
1919
RUN --mount=target=. \
2020
--mount=type=cache,target=/go/pkg/mod \
2121
--mount=type=cache,target=/root/.cache/go-build \

0 commit comments

Comments
 (0)