Skip to content

Commit 5562c7d

Browse files
committed
Enable XBUILD_OPTIONS in workflow
Signed-off-by: Marco Franssen <[email protected]>
1 parent e075121 commit 5562c7d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/pr_build.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ jobs:
158158
uses: docker/setup-buildx-action@v2
159159
- name: Build images
160160
run: make images
161+
env:
162+
XBUILD_OPTIONS: --load
161163
- name: Export images
162164
run: docker save spire-server:latest-local spire-agent:latest-local k8s-workload-registrar:latest-local oidc-discovery-provider:latest-local | gzip > images.tar.gz
163165
- name: Archive images
@@ -218,6 +220,8 @@ jobs:
218220
uses: docker/setup-buildx-action@v2
219221
- name: Build scratch images
220222
run: make scratch-images
223+
env:
224+
XBUILD_OPTIONS: --load
221225
- name: Export scratch images
222226
run: docker save spire-server-scratch:latest-local spire-agent-scratch:latest-local k8s-workload-registrar-scratch:latest-local oidc-discovery-provider-scratch:latest-local | gzip > scratch-images.tar.gz
223227
- name: Archive scratch images
@@ -254,6 +258,8 @@ jobs:
254258
uses: docker/setup-buildx-action@v2
255259
- name: Build static images
256260
run: make static-images
261+
env:
262+
XBUILD_OPTIONS: --load
257263
- name: Export static images
258264
run: docker save spire-server-static:latest-local spire-agent-static:latest-local k8s-workload-registrar-static:latest-local oidc-discovery-provider-static:latest-local | gzip > static-images.tar.gz
259265
- name: Archive static images

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ endif
114114

115115
PLATFORMS ?= linux/amd64,linux/arm64/v7,linux/arm64/v8
116116
DOCKERFILE := Dockerfile
117+
XBUILD_OPTIONS ?=
117118

118119
build_dir := $(DIR)/.build/$(os1)-$(arch1)
119120

@@ -343,6 +344,7 @@ docker-buildx: container-builder
343344
--build-arg goversion=$(go_version_full) \
344345
--target $(COMPONENT) \
345346
-t $(COMPONENT) \
347+
$(XBUILD_OPTIONS) \
346348
.
347349
$(E)docker tag $(COMPONENT):latest $(COMPONENT):latest-local
348350

0 commit comments

Comments
 (0)