Setup release of docker images to dockerhub

This commit is contained in:
Martin Šalata
2021-04-02 23:15:08 +02:00
parent cfa76c2953
commit c80ce5e9a6
5 changed files with 19 additions and 12 deletions
+8 -2
View File
@@ -18,7 +18,7 @@ export GOPATH ?= $(GOPATH_DEFAULT)
TESTARGS_DEFAULT := "-v"
export TESTARGS ?= $(TESTARGS_DEFAULT)
DEST := $(GOPATH)/src/$(GIT_HOST)/$(BASE_DIR)
IMAGE_TAG ?= $(shell cat "$(REPO_ROOT)/VERSION")-$(shell git describe --match=$(git rev-parse --short=8 HEAD) --tags --always --dirty)
IMAGE_TAG ?= $(shell cat "$(REPO_ROOT)/VERSION")
LOCAL_OS := $(shell uname)
@@ -78,7 +78,13 @@ build-linux:
# image section
############################################################
image: build-image push-image
image: docker-login build-image push-image
docker-login:
@echo ${DOCKER_TOKEN} | docker login -u ${DOCKER_USER} --password-stdin
docker-logout:
@docker logout
build-image:
@echo "Building the docker image: $(IMAGE_REPO)/$(IMAGE_NAME):$(IMAGE_TAG)..."