From b370b80dfb6701b8601c32f44102aec60a5d5ac8 Mon Sep 17 00:00:00 2001 From: alorente Date: Thu, 5 Dec 2024 20:12:23 +0100 Subject: [PATCH] fix: Add more OCI Image Labels (#25074) Co-authored-by: Koen Kanters --- .github/workflows/ci.yml | 4 ++++ docker/Dockerfile | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 502177e27..8b4f5b39e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -82,6 +82,8 @@ jobs: push: true build-args: | COMMIT=${{ github.sha }} + VERSION=dev + DATE=${{ github.event.repository.updated_at }} - name: release - Docker build and push if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' @@ -95,6 +97,8 @@ jobs: push: true build-args: | COMMIT=${{ github.sha }} + VERSION=${{ github.ref_name }} + DATE=${{ github.event.repository.updated_at }} - name: 'release: Publish to npm' if: startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' diff --git a/docker/Dockerfile b/docker/Dockerfile index b517f7057..614d98ecf 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,12 +15,17 @@ RUN apk add make gcc g++ python3 linux-headers npm && \ # Release FROM base AS release +ARG DATE +ARG VERSION LABEL org.opencontainers.image.authors="Koen Kanters" LABEL org.opencontainers.image.title="zigbee2mqtt" LABEL org.opencontainers.image.description="Zigbee to MQTT bridge using Zigbee-herdsman" LABEL org.opencontainers.image.url="https://github.com/Koenkk/zigbee2mqtt" LABEL org.opencontainers.image.documentation="https://www.zigbee2mqtt.io/" LABEL org.opencontainers.image.source="https://github.com/Koenkk/zigbee2mqtt" +LABEL org.opencontainers.image.licenses="GPL-3.0" +LABEL org.opencontainers.image.created=${DATE} +LABEL org.opencontainers.image.version=${VERSION} COPY --from=deps /app/node_modules ./node_modules COPY dist ./dist