summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-04-12 22:17:08 +0200
committertechknowlogick <techknowlogick@noreply.gitea.io>2023-04-12 22:17:08 +0200
commita05c5ba3ad5bc8f3ed8f31707a6c83eba60354d9 (patch)
tree6c84c3e1d258fe54fb58b8debb91f9821b118542 /Makefile
parentSet specific environments to distinguish between Gitea and GitHub (#113) (diff)
downloadforgejo-runner-a05c5ba3ad5bc8f3ed8f31707a6c83eba60354d9.tar.xz
forgejo-runner-a05c5ba3ad5bc8f3ed8f31707a6c83eba60354d9.zip
Add make docker (#115)
Reviewed-on: https://gitea.com/gitea/act_runner/pulls/115 Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-committed-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 139cc83..9bae70d 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,10 @@ WINDOWS_ARCHS ?= windows/amd64
GO_FMT_FILES := $(shell find . -type f -name "*.go" ! -name "generated.*")
GOFILES := $(shell find . -type f -name "*.go" -o -name "go.mod" ! -name "generated.*")
+DOCKER_IMAGE ?= gitea/act_runner
+DOCKER_TAG ?= nightly
+DOCKER_REF := $(DOCKER_IMAGE):$(DOCKER_TAG)
+
ifneq ($(shell uname), Darwin)
EXTLDFLAGS = -extldflags "-static" $(null)
else
@@ -156,6 +160,10 @@ release-check: | $(DIST_DIRS)
release-compress: | $(DIST_DIRS)
cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && $(GO) run $(GXZ_PAGAGE) -k -9 $${file}; done;
+.PHONY: docker
+docker:
+ docker build --disable-content-trust=false -t $(DOCKER_REF) .
+
clean:
$(GO) clean -x -i ./...
rm -rf coverage.txt $(EXECUTABLE) $(DIST)