diff --git a/cmd/oras/push.go b/cmd/oras/push.go index 582de27c7..74e6aafad 100644 --- a/cmd/oras/push.go +++ b/cmd/oras/push.go @@ -81,7 +81,7 @@ Example - Push file to the HTTP registry: cmd.Flags().StringVarP(&opts.manifestAnnotations, "manifest-annotations", "", "", "manifest annotation file") cmd.Flags().StringVarP(&opts.manifestExport, "export-manifest", "", "", "export the pushed manifest") cmd.Flags().StringVarP(&opts.artifactType, "artifact-type", "", "", "artifact type") - cmd.Flags().StringVarP(&opts.artifactRefs, "artifact-reference", "", "", "artifact reference") + cmd.Flags().StringVarP(&opts.artifactRefs, "subject", "s", "", "subject artifact") cmd.Flags().BoolVarP(&opts.pathValidationDisabled, "disable-path-validation", "", false, "skip path validation") cmd.Flags().BoolVarP(&opts.verbose, "verbose", "v", false, "verbose output") cmd.Flags().BoolVarP(&opts.debug, "debug", "d", false, "debug mode") diff --git a/pkg/oras/push.go b/pkg/oras/push.go index f7ea8d8f4..ff5b3ca6a 100644 --- a/pkg/oras/push.go +++ b/pkg/oras/push.go @@ -93,6 +93,7 @@ func pack(provider content.Provider, descriptors []ocispec.Descriptor, opts *pus artifact := *opts.artifact artifact.Blobs = convertV1DescriptorsToV2(descriptors) artifact.Annotations = opts.manifestAnnotations + mediaType = artifactspec.MediaTypeArtifactManifest content = artifact } else { mediaType = ocispec.MediaTypeImageManifest