77 "context"
88
99 actions_model "code.gitea.io/gitea/models/actions"
10+ "code.gitea.io/gitea/models/db"
1011 git_model "code.gitea.io/gitea/models/git"
1112 issues_model "code.gitea.io/gitea/models/issues"
1213 "code.gitea.io/gitea/models/organization"
@@ -960,17 +961,22 @@ func (*webhookNotifier) CreateWorkflowJob(ctx context.Context, repo *repo_model.
960961 return
961962 }
962963
963- action , conclusion := toActionStatus (job .Status )
964+ status , conclusion := toActionStatus (job .Status )
964965 var runnerID int64
966+ var runnerName string
965967 var steps []* api.ActionWorkflowStep
966968
967969 if task != nil {
968970 runnerID = task .RunnerID
971+ if runner , ok , _ := db .GetByID [actions_model.ActionRunner ](ctx , runnerID ); ok {
972+ runnerName = runner .Name
973+ }
969974 for i , step := range task .Steps {
970- _ , stepConclusion := toActionStatus (job .Status )
975+ stepStatus , stepConclusion := toActionStatus (job .Status )
971976 steps = append (steps , & api.ActionWorkflowStep {
972977 Name : step .Name ,
973978 Number : int64 (i ),
979+ Status : stepStatus ,
974980 Conclusion : stepConclusion ,
975981 StartedAt : step .Started .AsTime ().UTC (),
976982 CompletedAt : step .Stopped .AsTime ().UTC (),
@@ -979,7 +985,7 @@ func (*webhookNotifier) CreateWorkflowJob(ctx context.Context, repo *repo_model.
979985 }
980986
981987 if err := PrepareWebhooks (ctx , source , webhook_module .HookEventWorkflowJob , & api.WorkflowJobPayload {
982- Action : action ,
988+ Action : status ,
983989 WorkflowJob : & api.ActionWorkflowJob {
984990 ID : job .ID ,
985991 RunID : job .RunID ,
@@ -989,8 +995,10 @@ func (*webhookNotifier) CreateWorkflowJob(ctx context.Context, repo *repo_model.
989995 RunAttempt : job .Attempt ,
990996 HeadSha : job .Run .CommitSHA ,
991997 HeadBranch : git .RefName (job .Run .Ref ).BranchName (),
998+ Status : status ,
992999 Conclusion : conclusion ,
9931000 RunnerID : runnerID ,
1001+ RunnerName : runnerName ,
9941002 Steps : steps ,
9951003 CreatedAt : job .Created .AsTime ().UTC (),
9961004 StartedAt : job .Started .AsTime ().UTC (),
0 commit comments