Fix incorrect job result status #40

Merged
wolfogre merged 1 commits from Zettat123/act:fix-pre-step-error into main 2023-04-14 07:42:04 +00:00
Member

Fix #24039(GitHub)

At present, if a job fails in the Set up job, the result status of the job will still be success. The reason is that the pre steps don't call SetJobError, so the jobError will be nil when post steps setting the job result. See

jobError := common.JobError(ctx)

Fix [#24039(GitHub)](https://github.com/go-gitea/gitea/issues/24039) At present, if a job fails in the `Set up job`, the result status of the job will still be `success`. The reason is that the `pre` steps don't call `SetJobError`, so the `jobError` will be nil when `post` steps setting the job result. See https://gitea.com/gitea/act/src/commit/5c4a96bcb797c7d013b878f1a3ceb74f9a834c64/pkg/runner/job_executor.go#L99
Zettat123 added 1 commit 2023-04-14 07:17:07 +00:00
set error for pre steps
All checks were successful
checks / check and test (pull_request) Successful in 1m27s
c9105125da
Zettat123 changed title from Fix incorrect job status to Fix incorrect job result status 2023-04-14 07:17:15 +00:00
wolfogre approved these changes 2023-04-14 07:41:51 +00:00
wolfogre merged commit ac1ba34518 into main 2023-04-14 07:42:04 +00:00
Owner

Please update the dependency of act_runner.

Please update the dependency of act_runner.
Author
Member

Please update the dependency of act_runner.

Done in PR gitea/act_runner#124

> Please update the dependency of act_runner. Done in PR https://gitea.com/gitea/act_runner/pulls/124
wolfogre referenced this issue from a commit 2023-04-14 10:20:05 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act#40
No description provided.