Skip to content

Commit 0ae9018

Browse files
authored
Merge pull request #71 from stacklok/fix/add-layer-annotation-title
fix: add org.opencontainers.image.title annotation to skill layer descriptor
2 parents dc11797 + 551c3df commit 0ae9018

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

oci/skills/packager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,6 +537,9 @@ func createManifest(
537537
MediaType: ocispec.MediaTypeImageLayerGzip,
538538
Digest: layerDigest,
539539
Size: int64(len(layerBytes)),
540+
Annotations: map[string]string{
541+
ocispec.AnnotationTitle: "skill.tar.gz",
542+
},
540543
},
541544
},
542545
Annotations: annotations,

oci/skills/packager_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func TestPackager_Package_VerifyManifest(t *testing.T) {
9595
assert.Equal(t, ocispec.MediaTypeImageConfig, manifest.Config.MediaType)
9696
require.Len(t, manifest.Layers, 1)
9797
assert.Equal(t, ocispec.MediaTypeImageLayerGzip, manifest.Layers[0].MediaType)
98+
assert.Equal(t, "skill.tar.gz", manifest.Layers[0].Annotations[ocispec.AnnotationTitle])
9899
assert.Equal(t, testSkillName, manifest.Annotations[AnnotationSkillName])
99100
}
100101

0 commit comments

Comments
 (0)