File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import (
1010
1111 actions_model "code.gitea.io/gitea/models/actions"
1212 "code.gitea.io/gitea/models/db"
13+ "code.gitea.io/gitea/models/unit"
1314 "code.gitea.io/gitea/modules/log"
1415 "code.gitea.io/gitea/modules/timeutil"
1516 webhook_module "code.gitea.io/gitea/modules/webhook"
@@ -44,6 +45,10 @@ func startTasks(ctx context.Context) error {
4445 return fmt .Errorf ("find specs: %w" , err )
4546 }
4647
48+ if err := specs .LoadRepos (); err != nil {
49+ return fmt .Errorf ("LoadRepos: %w" , err )
50+ }
51+
4752 // Loop through each spec and create a schedule task for it
4853 for _ , row := range specs {
4954 // cancel running jobs if the event is push
@@ -59,6 +64,11 @@ func startTasks(ctx context.Context) error {
5964 }
6065 }
6166
67+ cfg := row .Repo .MustGetUnit (ctx , unit .TypeActions ).ActionsConfig ()
68+ if cfg .IsWorkflowDisabled (row .Schedule .WorkflowID ) {
69+ continue
70+ }
71+
6272 if err := CreateScheduleTask (ctx , row .Schedule ); err != nil {
6373 log .Error ("CreateScheduleTask: %v" , err )
6474 return err
You can’t perform that action at this time.
0 commit comments