Skip to content

Commit

Permalink
fix: signature reference is not correct in load cm (#5)
Browse files Browse the repository at this point in the history
Signed-off-by: Nianyu Shen <xiaoyu9964@gmail.com>
  • Loading branch information
nianyush authored Oct 22, 2024
1 parent 05a9c79 commit 6f7eb03
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions pkg/oci/remote/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,13 +326,9 @@ func WriteSignedImageIndexImagesBulk(targetRegistry string, sii oci.SignedImageI
if err != nil {
return err
}
sigsTag, err := SignatureTag(ref, opts...)
if err != nil {
return fmt.Errorf("sigs tag: %w", err)
}
repo := ref.Context()
o := makeOptions(repo, opts...)
if err := remoteWrite(sigsTag, sigs, o.ROpt...); err != nil {
if err := remoteWrite(ref, sigs, o.ROpt...); err != nil {
return err
}
}
Expand All @@ -351,13 +347,9 @@ func WriteSignedImageIndexImagesBulk(targetRegistry string, sii oci.SignedImageI
if err != nil {
return err
}
attsTag, err := AttestationTag(ref, opts...)
if err != nil {
return fmt.Errorf("sigs tag: %w", err)
}
repo := ref.Context()
o := makeOptions(repo, opts...)
if err := remoteWrite(attsTag, atts, o.ROpt...); err != nil {
if err := remoteWrite(ref, atts, o.ROpt...); err != nil {
return err
}
}
Expand All @@ -376,13 +368,9 @@ func WriteSignedImageIndexImagesBulk(targetRegistry string, sii oci.SignedImageI
if err != nil {
return err
}
sbomsTag, err := SBOMTag(ref, opts...)
if err != nil {
return fmt.Errorf("sboms tag: %w", err)
}
repo := ref.Context()
o := makeOptions(repo, opts...)
if err := remoteWrite(sbomsTag, sboms, o.ROpt...); err != nil {
if err := remoteWrite(ref, sboms, o.ROpt...); err != nil {
return err
}
}
Expand Down

0 comments on commit 6f7eb03

Please sign in to comment.