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
github_packages: improve metadata. #10872
github_packages: improve metadata. #10872
Conversation
Review period will end on 2021-03-18 at 15:32:43 UTC. |
9d58360
to
8c7c8d6
Compare
Review period skipped due to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, Mike!
8c7c8d6
to
127446e
Compare
Thanks for the review @sjackman! |
- add more metadata to the images on upload - stitch together images using Docker's CLI - more code cleanup
127446e
to
0f87bf3
Compare
Annotations currently set {
"org.opencontainers.image.title" => "#{formula.full_name} #{package_version} #{bottle_tag}",
"org.opencontainers.image.url" => formula.homepage,
"org.opencontainers.image.version" => version,
"org.opencontainers.image.revision" => git_revision,
"org.opencontainers.image.source" => "https://github.com/#{org}/#{repo}/blob/#{git_revision}/#{git_path}",
"org.opencontainers.image.created" => created_time.strftime("%F"),
"org.opencontainers.image.description" => formula.desc,
"org.opencontainers.image.license" => formula.license,
} Annotations not set
See https://github.com/opencontainers/image-spec/blob/master/annotations.md#pre-defined-annotation-keys {
"org.opencontainers.image.authors" => "A Name Or <an@email.address>",
"org.opencontainers.image.documentation" => "https://formulae.brew.sh/formula/#{formula.name}",
"org.opencontainers.image.vendor" => org,
"org.opencontainers.image.ref.name" => "#{package_version}.#{bottle_tag},
} |
skopeo inspect --raw docker://ghcr.io/brewsci/bio/ssm:1.4-x86_64_linux | jq . {
"schemaVersion": 2,
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"digest": "sha256:38e6e8b622108194ee99310c23179d26d1c1165d5fe8a28690347dc136cb6b3c",
"size": 216
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"digest": "sha256:1b88c88c5b518517046acfe08fd37b382765a7ee7c05d6c24cfdc4e843adb31e",
"size": 136320,
"annotations": {
"org.opencontainers.image.title": "ssm--1.4.x86_64_linux.bottle.tar.gz"
}
}
],
"annotations": {
"org.opencontainers.image.description": "Secondary-structure matching, tool for fast protein structure alignment",
"org.opencontainers.image.license": "GPL-3.0-only",
"org.opencontainers.image.revision": "f4b62b94e7a53aef8ec832fc9e1f1c1c00247243fa3d302ebbd21d20ccf75a17b8a9918d2b0801a8",
"org.opencontainers.image.source": "https://github.com/brewsci/homebrew-bio/blob/f4b62b94e7a53aef8ec832fc9e1f1c1c00247243/Formula/ssm.rb",
"org.opencontainers.image.title": "brewsci/bio/ssm",
"org.opencontainers.image.url": "https://www2.mrc-lmb.cam.ac.uk",
"org.opencontainers.image.version": "1.4"
}
} For compatibility with ORAS (the concept and the tool), let’s set the |
Based on #10835 (comment) (and lots of help in Slack) from @sjackman.
Example package: https://github.com/orgs/Homebrew/packages/container/package/homebrew-core%2Flibev