fix: implement image urls more faithfully

This commit is contained in:
Alex Zenla
2024-04-22 05:34:00 +00:00
parent 87868acace
commit b1af297a55
5 changed files with 106 additions and 32 deletions

View File

@ -159,7 +159,9 @@ impl OciPackerCache {
let image_name = packed.name.to_string();
annotations.insert(ANNOTATION_IMAGE_NAME.to_string(), image_name);
let image_ref = packed.name.reference.clone();
annotations.insert(ANNOTATION_REF_NAME.to_string(), image_ref);
if let Some(image_ref) = image_ref {
annotations.insert(ANNOTATION_REF_NAME.to_string(), image_ref);
}
descriptor.set_annotations(Some(annotations));
manifests.push(descriptor.clone());
index.set_manifests(manifests);