From cac3048029320e61c17e88fa018462c024d84767 Mon Sep 17 00:00:00 2001 From: deusebio Date: Mon, 19 Feb 2024 14:09:06 -0800 Subject: [PATCH] [DPE-3457] Add description to OCI image to be rendered on GitHub Container Registry (#29) --- .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}