summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCrazyMax <crazy-max@users.noreply.github.com>2022-08-27 15:05:22 +0200
committerCrazyMax <crazy-max@users.noreply.github.com>2022-09-07 22:52:34 +0200
commit2e04be3fb92085d49854cc680a2b686ff726dd15 (patch)
treea8e26182d4fe74d464ee494b8a288949909205f7 /Makefile
parenta0a16bbed6ee302eab1a039bc130c3cd69e8e781 (diff)
downloaddocker-2e04be3fb92085d49854cc680a2b686ff726dd15.tar.gz
ci: gha test workflow for integration and unit test
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4d21efe28f..ddad782563 100644
--- a/Makefile
+++ b/Makefile
@@ -118,7 +118,7 @@ DOCKER_IMAGE := docker-dev
DOCKER_PORT_FORWARD := $(if $(DOCKER_PORT),-p "$(DOCKER_PORT)",)
DELVE_PORT_FORWARD := $(if $(DELVE_PORT),-p "$(DELVE_PORT)",)
-DOCKER_FLAGS := $(DOCKER) run --rm -i --privileged $(DOCKER_CONTAINER_NAME) $(DOCKER_ENVS) $(DOCKER_MOUNT) $(DOCKER_PORT_FORWARD) $(DELVE_PORT_FORWARD)
+DOCKER_FLAGS := $(DOCKER) run --rm --privileged $(DOCKER_CONTAINER_NAME) $(DOCKER_ENVS) $(DOCKER_MOUNT) $(DOCKER_PORT_FORWARD) $(DELVE_PORT_FORWARD)
BUILD_APT_MIRROR := $(if $(DOCKER_BUILD_APT_MIRROR),--build-arg APT_MIRROR=$(DOCKER_BUILD_APT_MIRROR))
export BUILD_APT_MIRROR
@@ -137,6 +137,14 @@ ifeq ($(INTERACTIVE), 1)
DOCKER_FLAGS += -t
endif
+# on GitHub Runners input device is not a TTY but we allocate a pseudo-one,
+# otherwise keep STDIN open even if not attached if not a GitHub Runner.
+ifeq ($(GITHUB_ACTIONS),true)
+ DOCKER_FLAGS += -t
+else
+ DOCKER_FLAGS += -i
+endif
+
DOCKER_RUN_DOCKER := $(DOCKER_FLAGS) "$(DOCKER_IMAGE)"
DOCKER_BUILD_ARGS += --build-arg=GO_VERSION