From e5b5ee6f1d5be1455595c4460e36b56b73affa0b Mon Sep 17 00:00:00 2001 From: Rolf Ahrenberg Date: Sat, 11 Sep 2021 13:39:09 +0300 Subject: [PATCH] Make target platform configurable for runner builds --- runner/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/runner/Makefile b/runner/Makefile index 94305536..a0c90abb 100644 --- a/runner/Makefile +++ b/runner/Makefile @@ -1,6 +1,7 @@ NAME ?= summerwind/actions-runner DIND_RUNNER_NAME ?= ${NAME}-dind TAG ?= latest +TARGET_PLATFORM ?= $(shell arch) RUNNER_VERSION ?= 2.280.3 DOCKER_VERSION ?= 20.10.8 @@ -23,8 +24,8 @@ else endif docker-build-ubuntu: - docker build --build-arg TARGETPLATFORM=$(shell arch) --build-arg RUNNER_VERSION=${RUNNER_VERSION} --build-arg DOCKER_VERSION=${DOCKER_VERSION} -t ${NAME}:${TAG} . - docker build --build-arg TARGETPLATFORM=$(shell arch) --build-arg RUNNER_VERSION=${RUNNER_VERSION} --build-arg DOCKER_VERSION=${DOCKER_VERSION} -t ${DIND_RUNNER_NAME}:${TAG} -f Dockerfile.dindrunner . + docker build --build-arg TARGETPLATFORM=${TARGET_PLATFORM} --build-arg RUNNER_VERSION=${RUNNER_VERSION} --build-arg DOCKER_VERSION=${DOCKER_VERSION} -t ${NAME}:${TAG} . + docker build --build-arg TARGETPLATFORM=${TARGET_PLATFORM} --build-arg RUNNER_VERSION=${RUNNER_VERSION} --build-arg DOCKER_VERSION=${DOCKER_VERSION} -t ${DIND_RUNNER_NAME}:${TAG} -f Dockerfile.dindrunner . docker-push-ubuntu: docker push ${NAME}:${TAG}