This commit is contained in:
27
main.go
Normal file
27
main.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/sethvargo/go-githubactions"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
ctx, err := githubactions.Context()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
body, err := json.Marshal(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Printf("context: %s\n", string(body))
|
||||
|
||||
username := githubactions.GetInput("username")
|
||||
fmt.Printf("username is %s\n", username)
|
||||
|
||||
githubactions.SetOutput("time", time.Now().Format("2006-01-02 15:04:05"))
|
||||
}
|
||||
Reference in New Issue
Block a user