mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: handle go closure iteration (#1374)
Copy the matrix to make it closure aware
This commit is contained in:
parent
c08e2b605c
commit
13f3136717
1 changed files with 2 additions and 0 deletions
|
@ -121,6 +121,7 @@ func New(runnerConfig *Config) (Runner, error) {
|
|||
}
|
||||
|
||||
// NewPlanExecutor ...
|
||||
//
|
||||
//nolint:gocyclo
|
||||
func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
|
||||
maxJobNameLen := 0
|
||||
|
@ -156,6 +157,7 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
|
|||
}
|
||||
|
||||
for i, matrix := range matrixes {
|
||||
matrix := matrix
|
||||
rc := runner.newRunContext(ctx, run, matrix)
|
||||
rc.JobName = rc.Name
|
||||
if len(matrixes) > 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue