From 249e4c25debc405d4544c6d9007a9d69c85653b4 Mon Sep 17 00:00:00 2001 From: Enrico Deusebio Date: Fri, 9 Feb 2024 17:14:51 +0100 Subject: [PATCH] [DPE-3457] Add description to OCI image to be rendered on GitHub Container Registry --- .github/workflows/publish.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 8c3f55f..a2fb625 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -94,9 +94,10 @@ jobs: docker-daemon:${IMAGE_NAME}:${TAG} COMMIT_ID=$(git log -1 --format=%H) + DESCRIPTION=$(yq .description rockcraft.yaml | xargs) # Add relevant labels - echo "FROM ${IMAGE_NAME}:${TAG}" | docker build --label org.opencontainers.image.revision="${COMMIT_ID}" --label org.opencontainers.image.source="${{ github.repositoryUrl }}" -t "${IMAGE_NAME}:${TAG}" - + echo "FROM ${IMAGE_NAME}:${TAG}" | docker build --label org.opencontainers.image.description="${DESCRIPTION}" --label org.opencontainers.image.revision="${COMMIT_ID}" --label org.opencontainers.image.source="${{ github.repositoryUrl }}" -t "${IMAGE_NAME}:${TAG}" - echo "Publishing ${IMAGE_NAME}:${TAG}" docker push ${IMAGE_NAME}:${TAG}