fix: post step failure is job failure (#5297)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
ChristopherHX
2025-06-13 18:53:18 +02:00
committed by GitHub
parent 515dd6612c
commit 7c7b383c10
6 changed files with 32 additions and 8 deletions

View File

@@ -92,7 +92,7 @@ func newJobExecutor(info jobInfo, sf stepFactory, rc *RunContext) common.Executo
return nil
}))
postExec := useStepLogger(rc, stepModel, stepStagePost, step.post())
postExec := useStepLogger(rc, stepModel, stepStagePost, step.post().ThenError(setJobError))
if postExecutor != nil {
// run the post executor in reverse order
postExecutor = postExec.Finally(postExecutor)