Expose SetJob to make EraseNeeds work (#35)

Related to #33

Reviewed-on: https://gitea.com/gitea/act/pulls/35
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
Jason Song
2023-03-29 13:57:29 +08:00
parent 342ad6a51a
commit 2eb4de02ee
7 changed files with 89 additions and 13 deletions

View File

@@ -61,8 +61,8 @@ func Parse(content []byte, options ...ParseOption) ([]*SingleWorkflow, error) {
Env: workflow.Env,
Defaults: workflow.Defaults,
}
if err := swf.setJob(id, job); err != nil {
return nil, fmt.Errorf("setJob: %w", err)
if err := swf.SetJob(id, job); err != nil {
return nil, fmt.Errorf("SetJob: %w", err)
}
ret = append(ret, swf)
}