File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
10
10
11
11
actions_model "code.gitea.io/gitea/models/actions"
12
12
"code.gitea.io/gitea/models/db"
13
+ "code.gitea.io/gitea/models/unit"
13
14
"code.gitea.io/gitea/modules/log"
14
15
"code.gitea.io/gitea/modules/timeutil"
15
16
webhook_module "code.gitea.io/gitea/modules/webhook"
@@ -44,6 +45,10 @@ func startTasks(ctx context.Context) error {
44
45
return fmt .Errorf ("find specs: %w" , err )
45
46
}
46
47
48
+ if err := specs .LoadRepos (); err != nil {
49
+ return fmt .Errorf ("LoadRepos: %w" , err )
50
+ }
51
+
47
52
// Loop through each spec and create a schedule task for it
48
53
for _ , row := range specs {
49
54
// cancel running jobs if the event is push
@@ -59,6 +64,11 @@ func startTasks(ctx context.Context) error {
59
64
}
60
65
}
61
66
67
+ cfg := row .Repo .MustGetUnit (ctx , unit .TypeActions ).ActionsConfig ()
68
+ if cfg .IsWorkflowDisabled (row .Schedule .WorkflowID ) {
69
+ continue
70
+ }
71
+
62
72
if err := CreateScheduleTask (ctx , row .Schedule ); err != nil {
63
73
log .Error ("CreateScheduleTask: %v" , err )
64
74
return err
You can’t perform that action at this time.
0 commit comments