feat: expose if docker is enabled and wait for docker to be ready (#962)

Resolves #897
Resolves #915
This commit is contained in:
Callum Tait
2021-12-29 01:23:35 +00:00
committed by GitHub
parent c5950d75fa
commit ad48851dc9
8 changed files with 54 additions and 12 deletions

View File

@@ -1,9 +1,10 @@
NAME ?= summerwind/actions-runner
DIND_RUNNER_NAME ?= ${NAME}-dind
DOCKER_USER ?= summerwind
NAME ?= ${DOCKER_USER}/actions-runner
DIND_RUNNER_NAME ?= ${DOCKER_USER}/actions-runner-dind
TAG ?= latest
TARGET_PLATFORM ?= $(shell arch)
TARGETPLATFORM ?= $(shell arch)
RUNNER_VERSION ?= 2.280.3
RUNNER_VERSION ?= 2.286.0
DOCKER_VERSION ?= 20.10.8
# default list of platforms for which multiarch image is built
@@ -24,8 +25,8 @@ else
endif
docker-build-ubuntu:
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 build --build-arg TARGETPLATFORM=${TARGETPLATFORM} --build-arg RUNNER_VERSION=${RUNNER_VERSION} --build-arg DOCKER_VERSION=${DOCKER_VERSION} -t ${NAME}:${TAG} .
docker build --build-arg TARGETPLATFORM=${TARGETPLATFORM} --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}
@@ -39,12 +40,12 @@ docker-buildx-ubuntu:
docker buildx build --platform ${PLATFORMS} \
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
-t "${NAME}:latest" \
-t "${NAME}:${TAG}" \
-f Dockerfile \
. ${PUSH_ARG}
docker buildx build --platform ${PLATFORMS} \
--build-arg RUNNER_VERSION=${RUNNER_VERSION} \
--build-arg DOCKER_VERSION=${DOCKER_VERSION} \
-t "${DIND_RUNNER_NAME}:latest" \
-t "${DIND_RUNNER_NAME}:${TAG}" \
-f Dockerfile.dindrunner \
. ${PUSH_ARG}