aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Quintana <[email protected]>2021-03-16 00:54:33 +0100
committerJose Quintana <[email protected]>2021-03-16 00:54:33 +0100
commit990c5b8d8a75df6238699def2d1765dc4f2c5df9 (patch)
tree05e868506cffbaaf448f6389d6ff9ceb43a6cd79
parent65444d417cd5540855c1844e994753950b564729 (diff)
downloadalpine-cgit-990c5b8d8a75df6238699def2d1765dc4f2c5df9.tar.xz
alpine-cgit-990c5b8d8a75df6238699def2d1765dc4f2c5df9.zip
chore: make publish task
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index f9a12fe..96438b2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,24 @@
+DOCKER_IMAGE_TAG=joseluisq/alpine-cgit
+DRONE_COMMIT_SHA ?= $(shell git rev-parse HEAD)
+
build:
docker build \
-t joseluisq/alpine-cgit:latest \
-f Dockerfile .
.PHONY: build
+
+publish:
+ docker run --rm \
+ -e DRONE_TAG=$(TAG_VERSION) \
+ -e PLUGIN_TAG=$(TAG_VERSION) \
+ -e PLUGIN_REPO=$(DOCKER_IMAGE_TAG) \
+ -e DRONE_COMMIT_SHA=$(DRONE_COMMIT_SHA) \
+ -e PLUGIN_AUTO_TAG=true \
+ -e PLUGIN_AUTO_TAG_ALIASES=latest \
+ -v $(PWD):$(PWD) \
+ -w $(PWD) \
+ --privileged \
+ joseluisq/drone-docker \
+ --dockerfile Dockerfile \
+ --dry-run
+.PHONY: publish