mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: step env is unavailable in with property expr (#1458)
* fix: step env is unavailable in with property expr * don't run the test on windows * fix: composite action add missing shell Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
1441baa591
commit
68e74447c3
5 changed files with 40 additions and 2 deletions
|
@ -21,6 +21,10 @@ type ExpressionEvaluator interface {
|
|||
|
||||
// NewExpressionEvaluator creates a new evaluator
|
||||
func (rc *RunContext) NewExpressionEvaluator(ctx context.Context) ExpressionEvaluator {
|
||||
return rc.NewExpressionEvaluatorWithEnv(ctx, rc.GetEnv())
|
||||
}
|
||||
|
||||
func (rc *RunContext) NewExpressionEvaluatorWithEnv(ctx context.Context, env map[string]string) ExpressionEvaluator {
|
||||
// todo: cleanup EvaluationEnvironment creation
|
||||
using := make(map[string]map[string]map[string]string)
|
||||
strategy := make(map[string]interface{})
|
||||
|
@ -46,7 +50,7 @@ func (rc *RunContext) NewExpressionEvaluator(ctx context.Context) ExpressionEval
|
|||
|
||||
ee := &exprparser.EvaluationEnvironment{
|
||||
Github: ghc,
|
||||
Env: rc.GetEnv(),
|
||||
Env: env,
|
||||
Job: rc.getJobContext(),
|
||||
// todo: should be unavailable
|
||||
// but required to interpolate/evaluate the step outputs on the job
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue