17 lines
735 B
Makefile
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}
|