Skip to content

Commit 28da51c

Browse files
authored
add missed indentation for docker-build (#26)
2 parents 8d5c893 + d200fc7 commit 28da51c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.github/workflows/pr-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: make test
3434
- name: Upload code coverage
3535
uses: codecov/codecov-action@v3
36-
docker-build:
36+
docker-build:
3737
name: Build Docker images
3838
runs-on: ubuntu-latest
3939
steps:

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
IMG ?= public.ecr.aws/eks/amazon-network-policy-controller-k8s:v0.5.2
1717
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
1818
ENVTEST_K8S_VERSION = 1.26.1
19-
# PLATFORMS define the target platforms for the controller image be build
20-
PLATFORMS ?= linux/amd64,linux/arm64
19+
# ARCHS define the target architectures for the controller image be build
20+
ARCHS ?= amd64 arm64
2121
# IMG_SBOM defines the SBOM media type to use, we set to none since ECR doesn't support it yet
2222
IMG_SBOM ?= none
2323

@@ -175,7 +175,9 @@ BASE_IMAGE=public.ecr.aws/eks-distro-build-tooling/eks-distro-minimal-base-nonro
175175
GO_RUNNER_IMAGE=public.ecr.aws/eks-distro/kubernetes/go-runner:v0.15.0-eks-1-27-3
176176
.PHONY: docker-buildx
177177
docker-buildx: test
178-
docker buildx build --platform=$(PLATFORMS) -t $(IMG)-$(GOARCH) --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) --build-arg $(GOARCH) --load .
178+
for platform in $(ARCHS); do \
179+
docker buildx build --platform=linux/$$platform -t $(IMG)-$$platform --build-arg BASE_IMAGE=$(BASE_IMAGE) --build-arg BUILD_IMAGE=$(BUILD_IMAGE) --build-arg $$platform --load .; \
180+
done
179181

180182
# Check formatting of source code files without modification.
181183
check-format: FORMAT_FLAGS = -l

0 commit comments

Comments
 (0)