28 lines
419 B
Go
28 lines
419 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
type Config struct {
|
||
|
Repository string
|
||
|
Ref string
|
||
|
Token string
|
||
|
Path string
|
||
|
}
|
||
|
|
||
|
func getConfig() Config {
|
||
|
return Config{
|
||
|
Repository: os.Getenv("INPUT_REPOSITORY"),
|
||
|
Ref: os.Getenv("INPUT_REF"),
|
||
|
Token: os.Getenv("INPUT_TOKEN"),
|
||
|
Path: os.Getenv("INPUT_PATH"),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func main() {
|
||
|
cfg := getConfig()
|
||
|
fmt.Printf("Config: %+v\n", cfg)
|
||
|
}
|