mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
Made env interpolated instead of evaluated. (#1222)
* Made env interpolated instead of evaluated. * [skip ci] Add Test Workflow file * Activate Test * fix Test Co-authored-by: ChristopherHX <christopher.homberger@web.de>
This commit is contained in:
parent
416f715ecc
commit
cbf2df6053
3 changed files with 23 additions and 5 deletions
|
@ -14,7 +14,6 @@ import (
|
|||
|
||||
"github.com/nektos/act/pkg/common"
|
||||
"github.com/nektos/act/pkg/container"
|
||||
"github.com/nektos/act/pkg/exprparser"
|
||||
"github.com/nektos/act/pkg/model"
|
||||
)
|
||||
|
||||
|
@ -165,10 +164,7 @@ func (runner *runnerImpl) NewPlanExecutor(plan *model.Plan) common.Executor {
|
|||
// evaluate environment variables since they can contain
|
||||
// GitHub's special environment variables.
|
||||
for k, v := range rc.GetEnv() {
|
||||
valueEval, err := rc.ExprEval.evaluate(ctx, v, exprparser.DefaultStatusCheckNone)
|
||||
if err == nil {
|
||||
rc.Env[k] = fmt.Sprintf("%v", valueEval)
|
||||
}
|
||||
rc.Env[k] = rc.ExprEval.Interpolate(ctx, v)
|
||||
}
|
||||
if len(rc.String()) > maxJobNameLen {
|
||||
maxJobNameLen = len(rc.String())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue