Skip to content

Commit

Permalink
Merge pull request superfly#2423 from superfly/fix/prefer-digest-over…
Browse files Browse the repository at this point in the history
…-tag

fix: prefer image digest over image tag for migrations
  • Loading branch information
jipperinbham authored Jun 8, 2023
2 parents b2dadd7 + 4d78cf5 commit aa76158
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/command/migrate_to_v2/migrate_to_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ func NewV2PlatformMigrator(ctx context.Context, appName string) (V2PlatformMigra

var img string
switch {
case appFull.ImageDetails.Tag != "":
img = fmt.Sprintf("%s/%s:%s", appFull.ImageDetails.Registry, appFull.ImageDetails.Repository, appFull.ImageDetails.Tag)
case appFull.ImageDetails.Digest != "":
img = fmt.Sprintf("%s/%s@%s", appFull.ImageDetails.Registry, appFull.ImageDetails.Repository, appFull.ImageDetails.Digest)
case appFull.ImageDetails.Tag != "":
img = fmt.Sprintf("%s/%s:%s", appFull.ImageDetails.Registry, appFull.ImageDetails.Repository, appFull.ImageDetails.Tag)
default:
return nil, fmt.Errorf("failed to get image info: no tag or digest found")
}
Expand Down

0 comments on commit aa76158

Please sign in to comment.