mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-11 17:50:58 +00:00
Support configuration variables
(#43)
related to: https://gitea.com/gitea/act_runner/issues/127 This PR make `act` support the expression like `${{ vars.YOUR_CUSTOM_VARIABLES }}`. Reviewed-on: https://gitea.com/gitea/act/pulls/43 Reviewed-by: Jason Song <i@wolfogre.com> Co-authored-by: sillyguodong <gedong_1994@163.com> Co-committed-by: sillyguodong <gedong_1994@163.com>
This commit is contained in:
parent
06f19bc1da
commit
bc78c7964a
5 changed files with 15 additions and 0 deletions
|
@ -81,6 +81,8 @@ func (rc *RunContext) NewExpressionEvaluatorWithEnv(ctx context.Context, env map
|
|||
Matrix: rc.Matrix,
|
||||
Needs: using,
|
||||
Inputs: inputs,
|
||||
|
||||
Vars: rc.getVarsContext(),
|
||||
}
|
||||
if rc.JobContainer != nil {
|
||||
ee.Runner = rc.JobContainer.GetRunnerContext(ctx)
|
||||
|
@ -130,6 +132,8 @@ func (rc *RunContext) NewStepExpressionEvaluator(ctx context.Context, step step)
|
|||
// todo: should be unavailable
|
||||
// but required to interpolate/evaluate the inputs in actions/composite
|
||||
Inputs: inputs,
|
||||
|
||||
Vars: rc.getVarsContext(),
|
||||
}
|
||||
if rc.JobContainer != nil {
|
||||
ee.Runner = rc.JobContainer.GetRunnerContext(ctx)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue