Skip to content

Commit

Permalink
Fixes bastienwirtz#858: add conventional labels to the docker image a…
Browse files Browse the repository at this point in the history
…nd pass the github.ref_name as VERSION_TAG build_args in docker/build-push-action pipeline
  • Loading branch information
molhambnotk committed Jan 8, 2025
1 parent a421a6b commit 7528323
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@ RUN pnpm build
# production stage
FROM alpine:3.20

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 \
Expand Down

0 comments on commit 7528323

Please sign in to comment.