This commit is contained in:
parent
c9f0fc3d86
commit
8f1877086c
4 changed files with 10 additions and 122 deletions
14
main.go
14
main.go
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue