diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 502177e27e..8b4f5b39e4 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 b517f70577..614d98ecf8 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