fix: fix params
Some checks failed
Sample Testing / my_job (push) Failing after 2m44s

This commit is contained in:
Marcel S. Henselin 2026-04-17 14:39:47 +02:00
parent c9f0fc3d86
commit 8f1877086c
4 changed files with 10 additions and 122 deletions

14
main.go
View file

@ -64,8 +64,11 @@ func main() {
status := githubactions.GetInput("status")
if status == "" {
githubactions.Fatalf("Missing input 'status'")
os.Exit(1)
githubactions.Infof("[INFO] Missing input 'status', trying default")
var ok bool
if status, ok = os.LookupEnv("JOB_STATUS"); ok {
githubactions.Infof("[INFO] found job status")
}
}
data.Status = status
@ -162,13 +165,6 @@ func card(d templateData) ([]byte, error) {
bdy += fmt.Sprintf("<b>Branch:</b> <font color='#00FF00f'>%s</font><br>", ref)
}
if d.Status == "" {
stat, ok := os.LookupEnv("JOB_STATUS")
if ok {
d.Status = stat
}
}
if d.Status != "" {
bdy += fmt.Sprintf("<b>Build Status:</b> <font color='#0000ff'>%s</font>", d.Status)
}