Closed favonia closed 11 months ago
Opened https://github.com/docker/build-push-action/pull/992 to add support for the new --annotation
flag (see also upstream https://github.com/docker/buildx/pull/2020).
Would just need to do smth like https://github.com/docker/build-push-action/pull/992/files#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03fR1174
But then we need to set the proper prefix to each "labels" either on the manifest or index. I'm working to make this possible with the metadata-action.
So how does it work with index:
?
I am currently doing:
labels: ${{ steps.meta.outputs.labels }}
annotations: ${{ steps.meta.outputs.labels }}
But that won't work if I need to prepend index:
to each entry? Is there an easy way to do this?
Is there a flag that you can set if you want them to be added to both?
@kroese It's already documented in README. However, I did feel the current README could help the users more and thus opened a PR #359. It still requires you to read through the documentation, though.
@favonia Sorry, I missed that, you are right!
Assuming that https://github.com/docker/build-push-action/issues/958 will be implemented, I hope annotations can be as well-supported as labels. That is, I wish in the JSON output would somehow contain one of the two values: either (for manifests)
or (for indexes)
However, I soon realized it is not easy to coherently extend the current UI to achieve this:
Despite the above point 3, it seems one reasonable design is:
metadata-action
to generate those standard annotations for the index or the manifests (or maybe somewhere else?).annotations
for the user to add or overwrite annotations.I don't want to claim this is a very good design because of the above points 2 and 3. The user will have to know whether there would be an index layer to pick the correct options. On the other hand, it doesn't seem to make things worse, and I'd like to start this conversation now because the automatic metadata generation is arguably the last piece of a smooth pipeline on GitHub.