Compare commits
2 commits
fc80df1ce7
...
bba0a33577
Author | SHA1 | Date | |
---|---|---|---|
bba0a33577 | |||
5c722b47c6 |
3 changed files with 13 additions and 13 deletions
|
@ -1,6 +1,7 @@
|
||||||
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
|
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||||
|
|
||||||
---
|
---
|
||||||
variables:
|
variables:
|
||||||
- &repo 'git.schmidl.dev/schtobia/buildimage'
|
- &repo 'git.schmidl.dev/schtobia/buildimage'
|
||||||
|
@ -12,7 +13,10 @@ steps:
|
||||||
repo: *repo
|
repo: *repo
|
||||||
registry: git.schmidl.dev
|
registry: git.schmidl.dev
|
||||||
dry_run: true
|
dry_run: true
|
||||||
# output: type=oci,dest=${CI_REPO_OWNER}-buildimage.tar
|
when:
|
||||||
|
branch:
|
||||||
|
exclude: [ master ]
|
||||||
|
event: push
|
||||||
|
|
||||||
publish-next-agent:
|
publish-next-agent:
|
||||||
image: woodpeckerci/plugin-docker-buildx
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
|
@ -23,6 +27,10 @@ steps:
|
||||||
registry: git.schmidl.dev
|
registry: git.schmidl.dev
|
||||||
dockerfile: dockerfile
|
dockerfile: dockerfile
|
||||||
platforms: linux/amd64,linux/arm64/v8
|
platforms: linux/amd64,linux/arm64/v8
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
when:
|
when:
|
||||||
branch: master
|
branch: master
|
||||||
event: push
|
event: push
|
||||||
|
|
3
Makefile
3
Makefile
|
@ -5,10 +5,11 @@
|
||||||
DOCKER := docker
|
DOCKER := docker
|
||||||
BUILDER := ${DOCKER} buildx
|
BUILDER := ${DOCKER} buildx
|
||||||
TAG := git.schmidl.dev/schtobia/buildimage
|
TAG := git.schmidl.dev/schtobia/buildimage
|
||||||
|
URL:= https://${TAG}
|
||||||
VERSION = $(shell git describe --tags --always --dirty)
|
VERSION = $(shell git describe --tags --always --dirty)
|
||||||
|
|
||||||
build: dockerfile
|
build: dockerfile
|
||||||
@${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} .
|
@${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
|
.PHONY: publish
|
||||||
publish: build
|
publish: build
|
||||||
|
|
13
dockerfile
13
dockerfile
|
@ -5,19 +5,14 @@
|
||||||
FROM debian:bullseye-slim
|
FROM debian:bullseye-slim
|
||||||
|
|
||||||
ARG DEBIAN_FRONTEND=noninteractive
|
ARG DEBIAN_FRONTEND=noninteractive
|
||||||
ARG GIT_COMMIT
|
|
||||||
ARG VERSION
|
|
||||||
ARG TIMESTAMP
|
|
||||||
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
||||||
org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \
|
org.opencontainers.image.base.name="docker.io/debian:bullseye-slim" \
|
||||||
org.opencontainers.image.title=buildimage \
|
org.opencontainers.image.title=buildimage
|
||||||
org.opencontainers.image.source="https://git.schmidl.dev/schtobia/buildimage" \
|
|
||||||
org.opencontainers.image.url="https://git.schmidl.dev/schtobia/buildimage"
|
|
||||||
|
|
||||||
# editorconfig-checker-disable
|
# editorconfig-checker-disable
|
||||||
|
|
||||||
RUN apt update \
|
RUN apt update \
|
||||||
&& apt install --assume-yes --no-install-recommends \
|
&& apt install --assume-yes --no-install-recommends --quiet \
|
||||||
build-essential \
|
build-essential \
|
||||||
dpkg-sig \
|
dpkg-sig \
|
||||||
git \
|
git \
|
||||||
|
@ -30,7 +25,3 @@ RUN useradd -rm builder
|
||||||
USER builder
|
USER builder
|
||||||
|
|
||||||
WORKDIR /workdir
|
WORKDIR /workdir
|
||||||
|
|
||||||
LABEL org.opencontainers.image.revision=${GIT_COMMIT}
|
|
||||||
LABEL org.opencontainers.image.version=${VERSION}
|
|
||||||
LABEL org.opencontainers.image.created=${TIMESTAMP}
|
|
||||||
|
|
Loading…
Reference in a new issue