File tree Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Expand file tree Collapse file tree 4 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 43
43
TRIVY_VULNDB : " /home/runner/.local/share/containers/trivy_db"
44
44
# Targets (and their folder) that should be scanned using FS instead of IMAGE scan due to resource constraints
45
45
TRIVY_SCAN_FS_JSON : ' {}'
46
+ BUILD_ARCH : ${{ inputs.platform }}
46
47
47
48
steps :
48
49
@@ -326,8 +327,7 @@ jobs:
326
327
fromJson(inputs.github).event_name == 'workflow_dispatch' }}
327
328
env :
328
329
IMAGE_TAG : " ${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
329
- # Configuring `podman build --platform=` through CONTAINER_BUILD_CACHE_ARGS is a venerable hack on this project
330
- CONTAINER_BUILD_CACHE_ARGS : " ${{ steps.extra-podman-build-args.outputs.EXTRA_PODMAN_BUILD_ARGS }} --platform=${{ inputs.platform }} --cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"
330
+ CONTAINER_BUILD_CACHE_ARGS : " ${{ steps.extra-podman-build-args.outputs.EXTRA_PODMAN_BUILD_ARGS }} --cache-from ${{ env.CACHE }} --cache-to ${{ env.CACHE }}"
331
331
- name : " pull_request: make ${{ inputs.target }}"
332
332
run : |
333
333
# print running stats on disk occupancy
@@ -338,8 +338,7 @@ jobs:
338
338
fromJson(inputs.github).event_name == 'pull_request_target' }}"
339
339
env :
340
340
IMAGE_TAG : " ${{ steps.calculated_vars.outputs.IMAGE_TAG }}"
341
- # Configuring `podman build --platform=` through CONTAINER_BUILD_CACHE_ARGS is a venerable hack on this project
342
- CONTAINER_BUILD_CACHE_ARGS : " ${{ steps.extra-podman-build-args.outputs.EXTRA_PODMAN_BUILD_ARGS }} --platform=${{ inputs.platform }} --cache-from ${{ env.CACHE }}"
341
+ CONTAINER_BUILD_CACHE_ARGS : " ${{ steps.extra-podman-build-args.outputs.EXTRA_PODMAN_BUILD_ARGS }} --cache-from ${{ env.CACHE }}"
343
342
# We don't have access to image registry, so disable pushing
344
343
PUSH_IMAGES : " no"
345
344
Original file line number Diff line number Diff line change 2
2
name : Create release
3
3
permissions :
4
4
contents : write
5
- on :
5
+ on : # yamllint disable-line rule:truthy
6
6
workflow_dispatch :
7
7
inputs :
8
8
release_tag :
Original file line number Diff line number Diff line change @@ -140,4 +140,3 @@ jobs:
140
140
release_tag : ${{ github.event.inputs.release_tag }}
141
141
release_name : ${{ github.event.inputs.release_name }}
142
142
branch : ${{ github.event.inputs.branch }}
143
-
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ WHERE_WHICH ?= which
39
39
40
40
# linux/amd64 or darwin/arm64
41
41
OS_ARCH =$(shell go env GOOS) /$(shell go env GOARCH)
42
+ BUILD_ARCH ?= linux/amd64
42
43
43
44
IMAGE_TAG ?= $(RELEASE ) _$(DATE )
44
45
KUBECTL_BIN ?= bin/kubectl
@@ -71,7 +72,7 @@ define build_image
71
72
$(info # Building $(IMAGE_NAME ) image...)
72
73
73
74
$(ROOT_DIR ) /scripts/sandbox.py --dockerfile '$(2 ) ' -- \
74
- $(CONTAINER_ENGINE ) build $(CONTAINER_BUILD_CACHE_ARGS ) --label release=${ RELEASE} --tag $(IMAGE_NAME ) --file '$(2 ) ' $(BUILD_ARGS ) {}\;
75
+ $(CONTAINER_ENGINE ) build $(CONTAINER_BUILD_CACHE_ARGS ) --platform= $( BUILD_ARCH ) -- label release=$( RELEASE ) --tag $(IMAGE_NAME ) --file '$(2 ) ' $(BUILD_ARGS ) {}\;
75
76
endef
76
77
77
78
# Push function for the notebook image:
You can’t perform that action at this time.
0 commit comments