Fixes #858: add conventional labels to the docker image and pass the github.ref_name as VERSION_TAG build_args in docker/build-push-action pipeline

pull/878/head
Molham Al Nasr 2025-01-08 12:14:07 +01:00 committed by Bastien Wirtz
parent 1d680ab2db
commit f0bcd50503
2 changed files with 13 additions and 0 deletions

View File

@ -44,3 +44,5 @@ jobs:
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.ref_name }}
platforms: linux/amd64,linux/arm/v7,linux/arm/v6,linux/arm64
build-args: |
VERSION_TAG=${{ github.ref_name }}

View File

@ -17,6 +17,17 @@ RUN pnpm build
# production stage
FROM alpine:3.21
LABEL \
org.label-schema.schema-version="1.0" \
org.label-schema.version="$VERSION_TAG" \
org.opencontainers.image.title="Homer Image" \
org.opencontainers.image.description="A dead simple static HOMepage for your servER to keep your services on hand, from a simple yaml configuration file." \
org.opencontainers.image.ref.name="b4bz/homer:22-alpine3.20" \
org.opencontainers.image.version="$VERSION_TAG" \
org.opencontainers.image.licenses="Apache-2.0 license" \
org.opencontainers.image.source="https://github.com/bastienwirtz/homer" \
org.opencontainers.image.url="https://homer-demo.netlify.app/"
ENV GID=1000 \
UID=1000 \
PORT=8080 \