|
@@ -21,7 +21,8 @@ import (
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
type GithubActions struct {
|
|
type GithubActions struct {
|
|
|
- ServerURL string
|
|
|
|
|
|
|
+ ServerURL string
|
|
|
|
|
+ InstanceName string
|
|
|
|
|
|
|
|
GithubOAuthIntegration *models.GitRepo
|
|
GithubOAuthIntegration *models.GitRepo
|
|
|
GitRepoName string
|
|
GitRepoName string
|
|
@@ -339,12 +340,23 @@ func (g *GithubActions) getBuildEnvSecretName() string {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (g *GithubActions) getPorterYMLFileName() string {
|
|
func (g *GithubActions) getPorterYMLFileName() string {
|
|
|
|
|
+ if g.InstanceName != "" {
|
|
|
|
|
+ return fmt.Sprintf("porter_%s_%s.yml", strings.Replace(
|
|
|
|
|
+ strings.ToLower(g.ReleaseName), "-", "_", -1),
|
|
|
|
|
+ strings.ToLower(g.InstanceName),
|
|
|
|
|
+ )
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return fmt.Sprintf("porter_%s.yml", strings.Replace(
|
|
return fmt.Sprintf("porter_%s.yml", strings.Replace(
|
|
|
strings.ToLower(g.ReleaseName), "-", "_", -1),
|
|
strings.ToLower(g.ReleaseName), "-", "_", -1),
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
func (g *GithubActions) getPorterTokenSecretName() string {
|
|
func (g *GithubActions) getPorterTokenSecretName() string {
|
|
|
|
|
+ if g.InstanceName != "" {
|
|
|
|
|
+ return fmt.Sprintf("PORTER_TOKEN_%s_%d", strings.ToUpper(g.InstanceName), g.ProjectID)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
return fmt.Sprintf("PORTER_TOKEN_%d", g.ProjectID)
|
|
return fmt.Sprintf("PORTER_TOKEN_%d", g.ProjectID)
|
|
|
}
|
|
}
|
|
|
|
|
|