Przeglądaj źródła

don't use environment variable for action version

Anukul Sangwan 4 lat temu
rodzic
commit
05df51566c
2 zmienionych plików z 5 dodań i 3 usunięć
  1. 0 2
      internal/config/config.go
  2. 5 1
      server/api/git_action_handler.go

+ 0 - 2
internal/config/config.go

@@ -71,8 +71,6 @@ type ServerConf struct {
 	ProvisionerCluster string `env:"PROVISIONER_CLUSTER"`
 	IngressCluster     string `env:"INGRESS_CLUSTER"`
 	SelfKubeconfig     string `env:"SELF_KUBECONFIG"`
-
-	UpdateAppGHAVersion string `env:"UPDATE_APP_GHA_VERSION,default=v0.1.0"`
 }
 
 // DBConf is the database configuration: if generated from environment variables,

+ 5 - 1
server/api/git_action_handler.go

@@ -16,6 +16,10 @@ import (
 	"github.com/porter-dev/porter/internal/registry"
 )
 
+const (
+	updateAppActionVersion = "v0.1.0"
+)
+
 // HandleCreateGitAction creates a new Github action in a repository for a given
 // release
 func (app *App) HandleCreateGitAction(w http.ResponseWriter, r *http.Request) {
@@ -108,7 +112,7 @@ func (app *App) createGitActionFromForm(
 	}
 
 	// convert the form to a git action config
-	gitAction, err := form.ToGitActionConfig(app.ServerConf.UpdateAppGHAVersion)
+	gitAction, err := form.ToGitActionConfig(updateAppActionVersion)
 
 	if err != nil {
 		app.handleErrorFormDecoding(err, ErrProjectDecode, w)