Very well might be doing something wrong / misinterpreting the API, but when I push an OCI artifact to github container registry using this for the config descriptor
ConfigDescriptor: &ocispec.Descriptor{
MediaType: "application/vnd.custom.config.v1+json",
Annotations: map[string]string{
"git-commit-hash": gitHash,
},
},
the media type shows up properly, but not the annotations. I expected to see an annotation for "git-commit-hash": gitHash.
"config": {
"digest": "",
"mediaType": "application/vnd.custom.config.v1+json",
"size": 0
}
The full PackManifest call is as follows. These are mainly dummy values for testing.
desc, err := oras.PackManifest(ctx, repo, oras.PackManifestVersion1_1, "application/octet-stream", oras.PackManifestOptions{
Layers: layers,
ManifestAnnotations: map[string]string{
"org.opencontainers.image.source": gitRemote,
},
ConfigDescriptor: &ocispec.Descriptor{
MediaType: "application/vnd.custom.config.v1+json",
Annotations: map[string]string{
"sal.git-commit-hash": gitHash,
},
},
})
I am using the following dependency and pushing to the standard github container registry (no special enterprise / self hosted registry)
oras.land/oras-go/v2 v2.6.1
From researching the docs it seemed like maybe Github container registry just wants all annotations in the block like this? These ManifestAnnotations definitely show up fine without issue
ManifestAnnotations: map[string]string{
"org.opencontainers.image.source": gitRemote,
},
Very well might be doing something wrong / misinterpreting the API, but when I push an OCI artifact to github container registry using this for the config descriptor
the media type shows up properly, but not the annotations. I expected to see an annotation for
"git-commit-hash": gitHash.The full
PackManifestcall is as follows. These are mainly dummy values for testing.I am using the following dependency and pushing to the standard github container registry (no special enterprise / self hosted registry)
From researching the docs it seemed like maybe Github container registry just wants all annotations in the block like this? These ManifestAnnotations definitely show up fine without issue