Files
gotify/main.go
fghwett ea9148395c
Some checks failed
代码更新通知 / update-server (push) Failing after 0s
first version
2024-12-18 11:23:01 +08:00

28 lines
462 B
Go

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"))
}