Explorar o código

fix image repo URI creation for GAR

Mohammed Nafees %!s(int64=3) %!d(string=hai) anos
pai
achega
21e0621b9d
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  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
 	return regID, imageURI, nil
 }
 }