From 84062437611f7399d194175989ca15211df5ce52 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Thu, 7 Sep 2023 13:00:07 +0200 Subject: [PATCH] added the version to image --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 38569b6..d8977d0 100644 --- a/Makefile +++ b/Makefile @@ -5,10 +5,11 @@ DOCKER := docker BUILDER := ${DOCKER} buildx TAG := git.schmidl.dev/schtobia/buildimage +VERSION = $(shell git describe --tags --always --dirty) build: dockerfile - @${BUILDER} build --build-arg=GIT_COMMIT=$(shell git describe --always) --build-arg=VERSION=$(shell git describe --tags --always --dirty) --build-arg=TIMESTAMP="$(shell date -u -Iseconds)" -t ${TAG} . + @${BUILDER} build --build-arg=GIT_COMMIT=$(shell git describe --always) --build-arg=VERSION=${VERSION} --build-arg=TIMESTAMP="$(shell date -u -Iseconds)" -t ${TAG} -t ${TAG}:${VERSION} . .PHONY: publish publish: build - @${DOCKER} push ${TAG} + @${DOCKER} push ${TAG}:latest ${TAG}:${VERSION}