mirror of
https://gitea.com/gitea/act_runner.git
synced 2026-08-09 13:25:02 +02:00
This reverts commit 1ba076d321.
`EraseNeeds` Shouldn't be used in `jobparser.Parse`, it's for https://github.com/go-gitea/gitea/blob/023e61e678dc353fa6c9b0299c37f48e98a3c7af/models/actions/run.go#L200
Or Gitea won't be able to get `Needs` of jobs.
Reviewed-on: https://gitea.com/gitea/act/pulls/32
Reviewed-by: Zettat123 <[email protected]>
This commit is contained in:
@@ -50,7 +50,6 @@ func Parse(content []byte, options ...ParseOption) ([]*SingleWorkflow, error) {
|
|||||||
runsOn[i] = evaluator.Interpolate(v)
|
runsOn[i] = evaluator.Interpolate(v)
|
||||||
}
|
}
|
||||||
job.RawRunsOn = encodeRunsOn(runsOn)
|
job.RawRunsOn = encodeRunsOn(runsOn)
|
||||||
job.EraseNeeds() // there will be only one job in SingleWorkflow, it cannot have needs
|
|
||||||
ret = append(ret, &SingleWorkflow{
|
ret = append(ret, &SingleWorkflow{
|
||||||
Name: workflow.Name,
|
Name: workflow.Name,
|
||||||
RawOn: workflow.RawOn,
|
RawOn: workflow.RawOn,
|
||||||
|
|||||||
+2
@@ -10,6 +10,7 @@ name: test
|
|||||||
jobs:
|
jobs:
|
||||||
job2:
|
job2:
|
||||||
name: job2
|
name: job2
|
||||||
|
needs: job1
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
steps:
|
steps:
|
||||||
- run: uname -a
|
- run: uname -a
|
||||||
@@ -18,6 +19,7 @@ name: test
|
|||||||
jobs:
|
jobs:
|
||||||
job3:
|
job3:
|
||||||
name: job3
|
name: job3
|
||||||
|
needs: [job1, job2]
|
||||||
runs-on: linux
|
runs-on: linux
|
||||||
steps:
|
steps:
|
||||||
- run: uname -a
|
- run: uname -a
|
||||||
|
|||||||
Reference in New Issue
Block a user