Added option to configure the source and target branch

This commit is contained in:
Leon Mika 2025-01-02 11:48:27 +11:00
parent 7999a86f58
commit ec773bc57d
3 changed files with 28 additions and 8 deletions

View file

@ -3,15 +3,19 @@ package main
import "os"
type config struct {
HostName string
AppName string
PrivateKey string
HostName string
AppName string
PrivateKey string
LocalBranch string
RemoteBranch string
}
func readConfig() config {
return config{
HostName: os.Getenv("INPUT_HOST"),
AppName: os.Getenv("INPUT_APP"),
PrivateKey: os.Getenv("INPUT_PRIVATE-KEY"),
HostName: os.Getenv("INPUT_HOST"),
AppName: os.Getenv("INPUT_APP"),
PrivateKey: os.Getenv("INPUT_PRIVATE-KEY"),
LocalBranch: os.Getenv("INPUT_SOURCE-BRANCH"),
RemoteBranch: os.Getenv("INPUT_REMOTE-BRANCH"),
}
}