Kaynağa Gözat

fix image repo URI creation for GAR

Mohammed Nafees 3 yıl önce
ebeveyn
işleme
21e0621b9d
1 değiştirilmiş dosya ile 5 ekleme ve 0 silme
  1. 5 0
      cli/cmd/deploy/create.go

+ 5 - 0
cli/cmd/deploy/create.go

@@ -433,6 +433,11 @@ func (c *CreateAgent) GetImageRepoURL(name, namespace string) (uint, string, err
 		}
 	}
 
+	if strings.Contains(imageURI, "pkg.dev") {
+		repoSlice := strings.Split(imageURI, "/")
+		imageURI = fmt.Sprintf("%s/%s", imageURI, repoSlice[len(repoSlice)-1])
+	}
+
 	return regID, imageURI, nil
 }