diff --git a/meta.jq b/meta.jq index 12b7a6e..8f7f8e0 100644 --- a/meta.jq +++ b/meta.jq @@ -209,11 +209,14 @@ def build_command: # munge the index to what crane wants ("Error: layout contains 5 entries, consider --index") @sh "jq \(" .manifests |= ( - del(.[].annotations) - | unique + "docker.io/\(first(.source.arches[.build.arch].archTags[0]))" as $refName + | unique_by([ .digest, .size, .mediaType ]) | if length != 1 then - error(\"unexpected number of manifests: \" + length) + error("unexpected number of manifests: " + length) else . end + | .[0].annotations += { + "org.opencontainers.image.ref.name": $refName + } ) " | unindent_and_decomment_jq(3)) temp/index.json > temp/index.json.new", "mv temp/index.json.new temp/index.json",