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 (#19)
  • Loading branch information
deusebio authored Feb 19, 2024
1 parent 66518b3 commit d0af5aa
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 @@ -93,9 +93,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 d0af5aa

Please sign in to comment.