You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement auto-cancellation of concurrent jobs if the event is push (#25716)
- cancel running jobs if the event is push
- Add a new function `CancelRunningJobs` to cancel all running jobs of a
run
- Update `FindRunOptions` struct to include `Ref` field and update its
condition in `toConds` function
- Implement auto cancellation of running jobs in the same workflow in
`notify` function
related task: #22751
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Signed-off-by: appleboy <appleboy.tw@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: delvh <dev.lh@web.de>
Copy file name to clipboardexpand all lines: models/actions/run.go
+68-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ type ActionRun struct {
34
34
Indexint64`xorm:"index unique(repo_index)"`// a unique number for each run of a repository
35
35
TriggerUserIDint64`xorm:"index"`
36
36
TriggerUser*user_model.User`xorm:"-"`
37
-
Refstring
37
+
Refstring`xorm:"index"`// the commit/tag/… that caused the run
38
38
CommitSHAstring
39
39
IsForkPullRequestbool// If this is triggered by a PR from a forked repository or an untrusted user, we need to check if it is approved and limit permissions when running the workflow.
40
40
NeedApprovalbool// may need approval if it's a fork pull request
0 commit comments