mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Avoid using log.Fatal
in pkg/*
(#39)
Follow https://github.com/nektos/act/pull/1705 Reviewed-on: https://gitea.com/gitea/act/pulls/39 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Jason Song <i@wolfogre.com> Co-committed-by: Jason Song <i@wolfogre.com>
This commit is contained in:
parent
eef897b208
commit
73d7678465
4 changed files with 63 additions and 36 deletions
|
@ -7,11 +7,11 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/nektos/act/pkg/common"
|
||||
"github.com/nektos/act/pkg/container"
|
||||
"github.com/nektos/act/pkg/model"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
// Runner provides capabilities to run GitHub actions
|
||||
|
@ -136,7 +136,11 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
|
|||
log.Errorf("Error while evaluating matrix: %v", err)
|
||||
}
|
||||
}
|
||||
matrixes := job.GetMatrixes()
|
||||
matrixes, err := job.GetMatrixes()
|
||||
if err != nil {
|
||||
log.Errorf("Error while get job's matrix: %v", err)
|
||||
// fall back to empty matrixes
|
||||
}
|
||||
maxParallel := 4
|
||||
if job.Strategy != nil {
|
||||
maxParallel = job.Strategy.MaxParallel
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue