Compare commits
9 commits
fc80df1ce7
...
808c42df23
Author | SHA1 | Date | |
---|---|---|---|
808c42df23 | |||
cff2fb783f | |||
b9a697c03d | |||
5f40113351 | |||
3aea973103 | |||
ab610c3834 | |||
82dc132190 | |||
9c0094ed71 | |||
c640b2fb7d |
3 changed files with 16 additions and 16 deletions
|
@ -1,7 +1,6 @@
|
|||
# SPDX-FileCopyrightText: 2023 Tobias Schmidl
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
---
|
||||
variables:
|
||||
- &repo 'git.schmidl.dev/schtobia/buildimage'
|
||||
|
@ -13,10 +12,7 @@ steps:
|
|||
repo: *repo
|
||||
registry: git.schmidl.dev
|
||||
dry_run: true
|
||||
when:
|
||||
branch:
|
||||
exclude: [ master ]
|
||||
event: push
|
||||
# output: type=oci,dest=${CI_REPO_OWNER}-buildimage.tar
|
||||
|
||||
publish-next-agent:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
|
@ -27,11 +23,7 @@ steps:
|
|||
registry: git.schmidl.dev
|
||||
dockerfile: dockerfile
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
#when:
|
||||
# branch: master
|
||||
# event: push
|
||||
when:
|
||||
branch: master
|
||||
event: push
|
||||
...
|
||||
|
|
3
Makefile
3
Makefile
|
@ -5,11 +5,10 @@
|
|||
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} .
|
||||
@${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
|
||||
|
|
13
dockerfile
13
dockerfile
|
@ -5,14 +5,19 @@
|
|||
FROM debian:bullseye-slim
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
ARG GIT_COMMIT
|
||||
ARG VERSION
|
||||
ARG TIMESTAMP
|
||||
LABEL org.opencontainers.image.licenses="AGPL-3.0-or-later" \
|
||||
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
|
||||
|
||||
RUN apt update \
|
||||
&& apt install --assume-yes --no-install-recommends --quiet \
|
||||
&& apt install --assume-yes --no-install-recommends \
|
||||
build-essential \
|
||||
dpkg-sig \
|
||||
git \
|
||||
|
@ -25,3 +30,7 @@ RUN useradd -rm builder
|
|||
USER builder
|
||||
|
||||
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