Uh oh!
There was an error while loading. Please reload this page.
labelPrefix flavor for annotations support - #351
Conversation
@crazy-max I think this solution might be the best one to this tricky problem, but I start to worry that it'll be difficult for a beginner to get it right. For example, I feel many will use |
crazy-max
commented
Oct 25, 2023
Yes I opened this PR as draft because of something similar. What I was thinking was instead providing new outputs such as -
name: Docker metauses: docker/metadata-action@v5with:
images: name/app
-
name: Build and pushuses: docker/build-push-action@v5with:
tags: ${{ steps.meta.outputs.tags }}labels: ${{ steps.meta.outputs.labels }}annotations: ${{ steps.meta.outputs.annotations-manifest }}You can then keep labels but also set annotations. |
favonia
commented
Oct 25, 2023
@crazy-max I like your new solution. It "only" covers 99.9% of the cases but that seems to match the philosophy of this GitHub Actions perfectly! |
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
fixes#332
With docker/build-push-action#992 and Buildx v0.12, it will be possible to set annotations to an image through the
--annotationflag.With this change in the metadata-action we can now set the
manifest:orindex:prefix to each label using thelabelPrefixattribute in theflavorinput. When used with thebuild-push-actionand theannotationsinput, it will either set annotations at the manifest or index level like: