From 74a4e5fd9607c3434a9a63e58ee2ba8840b54e3e Mon Sep 17 00:00:00 2001 From: Florian Date: Tue, 24 Jun 2025 12:54:42 +0200 Subject: [PATCH] Add build arguments for version and revision in Dockerfile and update build.yaml --- .gitea/workflows/build.yaml | 3 +++ Dockerfile | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index ede419e..525f3c3 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -47,6 +47,9 @@ jobs: with: platforms: linux/amd64,linux/arm64 push: true + build-args: | + VERSION=${{ github.event.release.tag_name }} + REVISION=${{ github.sha }} tags: | git.morlana.online/${{ github.repository_owner }}/homebrewery:latest git.morlana.online/${{ github.repository_owner }}/homebrewery:${{ github.event.release.tag_name }} diff --git a/Dockerfile b/Dockerfile index 1c2c1cf..dcffe71 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,19 @@ RUN npm run build FROM base as runner +ARG VERSION +ARG REVISION +ARG CREATED_AT + +LABEL org.opencontainers.image.authors=F.Weber +LABEL org.opencontainers.image.url=https://git.morlana.online/f.weber/homebrewery-docker/src/branch/main/README.md +LABEL org.opencontainers.image.documentation=https://git.morlana.online/f.weber/homebrewery-docker/src/branch/main/README.md +LABEL org.opencontainers.image.source=https://git.morlana.online/f.weber/homebrewery-docker +LABEL org.opencontainers.image.version=${VERSION} +LABEL org.opencontainers.image.revision=${REVISION} +LABEL org.opencontainers.image.licenses=MIT +LABEL org.opencontainers.image.created=${CREATED_AT} + # Defining env variables for homebrewery ENV HB_HOST=homebrewery.local.naturalcrit.com:8000 HB_NATURALCRIT_URL=local.naturalcrit.com:8010 HB_SECRET=secret PORT=8000 HB_ENABLE_V3=true HB_ENABLE_THEMES=true HB_LOCAL_ENVIRONMENTS=docker,local HB_PUBLIC_URL=https://homebrewery.naturalcrit.com ENV HB_IMAGES=null HB_FONTS=null