enhance(actions): show the steps the runner reports (#39720)

Gitea derives the steps of a job from the workflow file, so the `pre`
and `post` steps of actions only show up inside "Set up job" and
"Complete job".
Fixes https://github.com/go-gitea/gitea/issues/24604.

A runner can now report the steps it actually runs, and Gitea shows
those instead. Runners that don't report them keep the current view, and
older Gitea versions ignore them.

Related:
- Proto: https://gitea.com/gitea/actions-proto-def/pulls/19
- Runner: https://gitea.com/gitea/runner/pulls/1293
This commit is contained in:
bircni authored and GitHub committed 2026-10-12 22:36:25 +02:00
1 parent c501255d47
commit 4b5f1f46de
11 files changed
+337 -29

No files matched your search

+3
View File
@@ -17,6 +17,9 @@ func FullSteps(task *actions_model.ActionTask) []*actions_model.ActionTaskStep {
if len(task.Steps) == 0 {
return fullStepsOfEmptySteps(task)
}
if task.Steps[0].IsReported() {
return task.Steps // the runner reports its own setup and cleanup steps
}
// firstStep is the first step that has run or running, not include preStep.
// For example,