Skip to content

Commit

Permalink
Handle plan preview workflow's error and exit with error status code (p…
Browse files Browse the repository at this point in the history
…ipe-cd#4662)

Signed-off-by: 鈴木 優耀 <[email protected]>
  • Loading branch information
TakumaKurosawa authored and 鈴木 優耀 committed Feb 12, 2024
1 parent 74298b9 commit 3eb1d79
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tool/actions-plan-preview/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ func main() {
doComment(failureBadgeURL + "\nUnable to run plan-preview for a closed pull request.")
return
}
body := makeCommentBody(event, result)
doComment(failureBadgeURL + "\n" + body)
log.Println("plan-preview result has error")
os.Exit(1)
}

// Find comments we sent before
Expand Down

0 comments on commit 3eb1d79

Please sign in to comment.