Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCI image annotations option #1217

Open
candrews opened this issue Aug 21, 2024 · 1 comment
Open

OCI image annotations option #1217

candrews opened this issue Aug 21, 2024 · 1 comment
Labels
kind/enhancement New feature or request status/triage

Comments

@candrews
Copy link

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
  • if $GITHUB_REF_TYPE=tag then org.opencontainers.image.version=$GITHUB_REF_NAME
  • org.opencontainers.image.url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY
  • org.opencontainers.image.created=$(date -Iseconds)
@candrews candrews added kind/enhancement New feature or request status/triage labels Aug 21, 2024
@erhhung
Copy link

erhhung commented Aug 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request status/triage
Projects
None yet
Development

No branches or pull requests

2 participants