Open candrews opened 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.
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:
org.opencontainers.image.source=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY
org.opencontainers.image.revision=$GITHUB_SHA
org.opencontainers.image.ref.name=$GITHUB_REF
$GITHUB_REF_TYPE=tag
thenorg.opencontainers.image.version=$GITHUB_REF_NAME
org.opencontainers.image.url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY
org.opencontainers.image.created=$(date -Iseconds)