diff --git a/go.mod b/go.mod index c63dd3e..e975119 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,8 @@ module simple-go-action go 1.21.1 + +require ( + github.com/sethvargo/go-envconfig v0.8.0 // indirect + github.com/sethvargo/go-githubactions v1.1.0 // indirect +) diff --git a/main.go b/main.go index 5d1e78f..3a26df3 100644 --- a/main.go +++ b/main.go @@ -4,9 +4,18 @@ import ( "fmt" "os" "time" + + gha "github.com/sethvargo/go-githubactions" ) func main() { + username := gha.GetInput("username") + fmt.Printf("username is %s\n", username) + + gha.SetOutput("time", time.Now().Format("2006-01-02 15:04:05")) +} + +func old_version() { username := readInputs() fmt.Printf("username is %s\n", username)