forked from kevadesu/forgejo
fix: don't cancel schedule workflows on push to main branch
This commit is contained in:
parent
1806e336fc
commit
b20c0b1469
5 changed files with 17 additions and 15 deletions
|
@ -130,7 +130,7 @@ func notify(ctx context.Context, input *notifyInput) error {
|
|||
return nil
|
||||
}
|
||||
if unit_model.TypeActions.UnitGlobalDisabled() {
|
||||
if err := actions_model.CleanRepoScheduleTasks(ctx, input.Repo); err != nil {
|
||||
if err := actions_model.CleanRepoScheduleTasks(ctx, input.Repo, true); err != nil {
|
||||
log.Error("CleanRepoScheduleTasks: %v", err)
|
||||
}
|
||||
return nil
|
||||
|
@ -496,7 +496,7 @@ func handleSchedules(
|
|||
log.Error("CountSchedules: %v", err)
|
||||
return err
|
||||
} else if count > 0 {
|
||||
if err := actions_model.CleanRepoScheduleTasks(ctx, input.Repo); err != nil {
|
||||
if err := actions_model.CleanRepoScheduleTasks(ctx, input.Repo, false); err != nil {
|
||||
log.Error("CleanRepoScheduleTasks: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue