Fix: use INPUT

This commit is contained in:
Dorian Zedler 2023-08-25 23:22:53 +02:00
parent 751aebda05
commit 2f5528a63e
Signed by: dorian
GPG key ID: 989DE36109AFA354

View file

@ -20,7 +20,7 @@ import (
// Args provides plugin execution arguments.
type Args struct {
Folder string `required:"true" envconfig:"INPUTS_FOLDER"`
Folder string `required:"true" envconfig:"INPUT_FOLDER"`
SshKey string `envconfig:"INPUT_SSH_KEY"`
GitRemote string `envconfig:"INPUT_GIT_REMOTE"`
GitBranch string `envconfig:"INPUT_GIT_BRANCH"`
@ -99,15 +99,15 @@ func checkArgs(args *Args) error {
}
if (args.Token == "" || args.Username == "") && args.SshKey == "" {
return errors.New("(INPUTS_TOKEN and INPUTS_USERNAME) or INPUTS_SSH_KEY is required!")
return errors.New("(INPUT_TOKEN and INPUT_USERNAME) or INPUT_SSH_KEY is required!")
}
if folderInfo, err := os.Stat(args.Folder); os.IsNotExist(err) || !folderInfo.IsDir() {
return errors.New("INPUTS_FOLDER is not a folder!")
return errors.New("INPUT_FOLDER is not a folder!")
}
if args.GitRemote == "" && (args.GithubServerUrl == "" || args.GithubRepository == "") {
return errors.New("INPUTS_GIT_REMOTE is required!")
return errors.New("INPUT_GIT_REMOTE is required!")
}
if args.GitRemote == "" {