Support concurrency (#124)
To support `concurrency` syntax for Gitea Actions Gitea PR: https://github.com/go-gitea/gitea/pull/32751 Reviewed-on: https://gitea.com/gitea/act/pulls/124 Reviewed-by: Lunny Xiao <lunny@noreply.gitea.com> Co-authored-by: Zettat123 <zettat123@gmail.com> Co-committed-by: Zettat123 <zettat123@gmail.com>
This commit is contained in:
@@ -23,6 +23,8 @@ type Workflow struct {
|
||||
Env map[string]string `yaml:"env"`
|
||||
Jobs map[string]*Job `yaml:"jobs"`
|
||||
Defaults Defaults `yaml:"defaults"`
|
||||
|
||||
RawConcurrency *RawConcurrency `yaml:"concurrency"` // For Gitea
|
||||
}
|
||||
|
||||
// On events for the workflow
|
||||
@@ -769,3 +771,10 @@ func decodeNode(node yaml.Node, out interface{}) bool {
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// For Gitea
|
||||
// RawConcurrency represents a workflow concurrency or a job concurrency with uninterpolated options
|
||||
type RawConcurrency struct {
|
||||
Group string `yaml:"group,omitempty"`
|
||||
CancelInProgress string `yaml:"cancel-in-progress,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user