docker / build-push-action

GitHub Action to build and push Docker images with Buildx
https://github.com/marketplace/actions/build-and-push-docker-images
Apache License 2.0
4.41k stars 561 forks source link

OCI image annotations option #1217

Open candrews opened 3 months ago

candrews commented 3 months ago

Description

A new configuration option to add OCI image annotations would be very useful, ideally defaulted to enabled.

These annotations are useful for people to use manually and for use by tools. For example, Snyk uses them in its UI and Renovate uses them to find release notes.

These annotations would be set:

erhhung commented 3 months ago

Isn't that what docker/metadata-action is for? It outputs them both as labels ($DOCKER_METADATA_OUTPUT_LABELS) and annotations ($DOCKER_METADATA_OUTPUT_ANNOTATIONS).

If you need to supplement the default set (for example, org.opencontainers.image.authors and org.opencontainers.image.ref.name), you can pass them via labels and annotations inputs.