Skip to content

Commit

Permalink
[DPE-3457] Add description to OCI image to be rendered on GitHub Cont…
Browse files Browse the repository at this point in the history
…ainer Registry
  • Loading branch information
deusebio committed Feb 9, 2024
1 parent b561713 commit 249e4c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 249e4c2

Please sign in to comment.