chore: initial release
Some checks failed
Sample Testing / my_job (push) Failing after 39s

This commit is contained in:
Marcel S. Henselin 2026-04-16 08:27:55 +02:00
parent d346a15951
commit b027fab545
2 changed files with 18 additions and 14 deletions

30
main.go
View file

@ -14,25 +14,29 @@ func main() {
githubactions.Fatalf("Missing input 'project'")
}
commit := githubactions.GetInput("commit")
if commit == "" {
githubactions.Fatalf("Missing input 'commit'")
}
if commit == "" {
githubactions.Fatalf("Missing input 'commit'")
}
branch := githubactions.GetInput("branch")
if branch == "" {
githubactions.Fatalf("Missing input 'branch'")
}
if branch == "" {
githubactions.Fatalf("Missing input 'branch'")
}
status := githubactions.GetInput("status")
if status == "" {
githubactions.Fatalf("Missing input 'status'")
}
if status == "" {
githubactions.Fatalf("Missing input 'status'")
}
actionid := githubactions.GetInput("actionid")
if actionid == "" {
githubactions.Fatalf("Missing input 'actionid'")
}
if actionid == "" {
githubactions.Fatalf("Missing input 'actionid'")
}
webhook := githubactions.GetInput("webhook")
if webhook == "" {
githubactions.Fatalf("Missing input 'webshook'")
}
joburl := githubactions.GetInput("joburl")
if webhook == "" {
githubactions.Fatalf("Missing input 'joburl'")
}
fmt.Println("URL:> ", webhook)
data := `{
@ -70,7 +74,7 @@ func main() {
}
]
}`
var jsonStr = []byte(fmt.Sprintf(data, project, commit, branch, status, actionid ))
var jsonStr = []byte(fmt.Sprintf(data, project, commit, branch, status, actionid))
req, err := http.NewRequest("POST", webhook, bytes.NewBuffer(jsonStr))
if err != nil {
panic(err)