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

+1
View File
@@ -435,6 +435,7 @@ func prepareMigrationTasks() []*migration {
newMigration(356, "Add index on action_run commit_sha", v29.AddActionRunCommitSHAIndex),
newMigration(357, "Normalize legacy team authorize values", v29.NormalizeLegacyTeamAuthorize),
newMigration(358, "Track previous remember-me token hashes", v29.AddPreviousAuthTokenHash),
newMigration(359, "Add stage and number columns to action_task_step", v29.AddStageAndNumberToActionTaskStep),
}
return preparedMigrations
}
+25
View File
@@ -0,0 +1,25 @@
// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package v29
import (
"context"
"gitea.dev/modelmigration/base"
"xorm.io/xorm"
)
func AddStageAndNumberToActionTaskStep(_ context.Context, x base.EngineMigration) error {
type ActionTaskStep struct {
Stage int64 `xorm:"NOT NULL DEFAULT 0"`
Number int64 `xorm:"NOT NULL DEFAULT 0"`
}
_, err := x.SyncWithOptions(xorm.SyncOptions{
IgnoreConstrains: true,
IgnoreDropIndices: true,
}, new(ActionTaskStep))
return err
}