Skip to content

Commit efcbaf8

Browse files
GiteaBotyp05327
andauthored
Fix no ActionTaskOutput table waring (#28149) (#28152)
Backport #28149 by @yp05327 Reproduce: - Create a new Gitea instance - Register a runner - Create a repo and add a workflow - Check the log, you will see warnings: ![image](https://github.com/go-gitea/gitea/assets/18380374/5f1278e0-114b-48bc-8113-8ba1404d9975) It comes from: ![image](https://github.com/go-gitea/gitea/assets/18380374/c2807831-e137-4229-9536-87f6114c8a5b) The reason is that we forgot registering `ActionTaskOutput` model. So `action_table_output` table will be missing in your db. Co-authored-by: yp05327 <[email protected]>
1 parent c997e90 commit efcbaf8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

models/actions/task_output.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ type ActionTaskOutput struct {
2020
OutputValue string `xorm:"MEDIUMTEXT"`
2121
}
2222

23+
func init() {
24+
db.RegisterModel(new(ActionTaskOutput))
25+
}
26+
2327
// FindTaskOutputByTaskID returns the outputs of the task.
2428
func FindTaskOutputByTaskID(ctx context.Context, taskID int64) ([]*ActionTaskOutput, error) {
2529
var outputs []*ActionTaskOutput

0 commit comments

Comments
 (0)