buildimage/Makefile
Tobias Schmidl 874ecd0c01
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
fix: Repaired pushing to registry
Reviewed-on: #2
Co-authored-by: Tobias Schmidl <tobias@schmidl.dev>
Co-committed-by: Tobias Schmidl <tobias@schmidl.dev>
2023-09-22 08:34:50 +02:00

17 lines
735 B
Makefile

# SPDX-FileCopyrightText: 2023 Tobias Schmidl
#
# SPDX-License-Identifier: AGPL-3.0-or-later
DOCKER := docker
BUILDER := ${DOCKER} buildx
TAG := git.schmidl.dev/schtobia/buildimage
URL:= https://${TAG}
VERSION = $(shell git describe --tags --always --dirty)
build: dockerfile
@${BUILDER} build --label org.opencontainers.image.revision=$(shell git describe --always) --label org.opencontainers.image.version=${VERSION} --label org.opencontainers.image.created="$(shell date -u -Iseconds)" --label org.opencontainers.image.source=https://${TAG}.git --label org.opencontainers.image.url=https://${TAG} -t ${TAG} -t ${TAG}:${VERSION} .
.PHONY: publish
publish: build
@${DOCKER} push ${TAG}:latest
@${DOCKER} push ${TAG}:${VERSION}