mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
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
26 lines
528 B
Go
26 lines
528 B
Go
// 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
|
|
}
|