Skip to content

Commit

Permalink
feat: add version tags to the image and image index (#1055)
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkYuan committed Apr 19, 2024
1 parent eb5c699 commit abc3596
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/cmd/mod/mod_push.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,14 @@ func (o *PushModOptions) Run() error {
return err
}

// Tag version
if err = o.Client.Tag(ctx, imgDigestURL, o.Version); err != nil {
return fmt.Errorf("tagging module image version as latest failed: %w", err)
}
if err = o.Client.Tag(ctx, idxDigestURL, o.Version); err != nil {
return fmt.Errorf("tagging module index version as latest failed: %w", err)
}

// Tag latest version if required
if o.Latest {
if err = o.Client.Tag(ctx, imgDigestURL, LatestVersion); err != nil {
Expand Down

0 comments on commit abc3596

Please sign in to comment.