Tobias Schmidl
874ecd0c01
All checks were successful
ci/woodpecker/tag/woodpecker Pipeline was successful
Reviewed-on: #2 Co-authored-by: Tobias Schmidl <tobias@schmidl.dev> Co-committed-by: Tobias Schmidl <tobias@schmidl.dev>
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}
|