From ecf57baccc073ceb065d7fc9d82f89f33867f9ed Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Fri, 8 Mar 2024 18:55:37 +0100 Subject: [PATCH] Dockerfile, ci: Add image descriptions and source More information in case the image is consumed via different sources than the official one. Signed-off-by: Jan Kiszka --- .github/actions/docker-init/action.yml | 3 +++ .github/workflows/master.yml | 1 + .github/workflows/next.yml | 1 + .github/workflows/release.yml | 1 + Dockerfile | 6 ++++++ 5 files changed, 12 insertions(+) diff --git a/.github/actions/docker-init/action.yml b/.github/actions/docker-init/action.yml index 6b2d33ae..2cbbd193 100644 --- a/.github/actions/docker-init/action.yml +++ b/.github/actions/docker-init/action.yml @@ -61,3 +61,6 @@ runs: cache-source: var-lib-apt cache-target: /var/lib/apt skip-extraction: ${{ steps.cache-var-lib-apt.outputs.cache-hit }} + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index e128022b..f1583fd7 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -44,3 +44,4 @@ jobs: provenance: mode=max,reproducible=true outputs: type=registry,rewrite-timestamp=true tags: ghcr.io/siemens/kas/${{ matrix.image-name }} + annotations: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/next.yml b/.github/workflows/next.yml index 567f3cda..1af93993 100644 --- a/.github/workflows/next.yml +++ b/.github/workflows/next.yml @@ -105,3 +105,4 @@ jobs: provenance: mode=max,reproducible=true outputs: type=registry,rewrite-timestamp=true tags: ghcr.io/siemens/kas/${{ matrix.image-name }}:next + annotations: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 67e7a97c..96400a20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,3 +38,4 @@ jobs: ghcr.io/siemens/kas/${{ matrix.image-name }} ghcr.io/siemens/kas/${{ matrix.image-name }}:${{ env.RELEASE_VERSION }} ghcr.io/siemens/kas/${{ matrix.image-name }}:latest-release + annotations: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index dfebca2c..16b16449 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,6 +25,8 @@ ARG DEBIAN_TAG=bookworm-slim FROM debian:${DEBIAN_TAG} as kas-base +LABEL org.opencontainers.image.source="https://github.com/siemens/kas" + ARG SOURCE_DATE_EPOCH ARG CACHE_SHARING=locked @@ -95,6 +97,8 @@ ENTRYPOINT ["/container-entrypoint"] FROM kas-base as kas-isar +LABEL org.opencontainers.image.description="Build environment for isar-based Debian projects" + ARG SOURCE_DATE_EPOCH ARG CACHE_SHARING=locked @@ -125,6 +129,8 @@ USER builder FROM kas-base as kas +LABEL org.opencontainers.image.description "Build environment for Yocto/OpenEmbedded projects" + ARG SOURCE_DATE_EPOCH ARG CACHE_SHARING=locked