mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
cache dir for remote actions
This commit is contained in:
parent
e5680477f9
commit
0f6340f811
5 changed files with 76 additions and 111 deletions
|
@ -38,6 +38,7 @@ func (sc *StepContext) NewExpressionEvaluator() ExpressionEvaluator {
|
|||
vm := sc.RunContext.newVM()
|
||||
configers := []func(*otto.Otto){
|
||||
sc.vmEnv(),
|
||||
sc.vmInputs(),
|
||||
}
|
||||
for _, configer := range configers {
|
||||
configer(vm)
|
||||
|
@ -241,6 +242,16 @@ func (sc *StepContext) vmEnv() func(*otto.Otto) {
|
|||
}
|
||||
}
|
||||
|
||||
func (sc *StepContext) vmInputs() func(*otto.Otto) {
|
||||
inputs := make(map[string]string)
|
||||
for k, v := range sc.Step.With {
|
||||
inputs[k] = v
|
||||
}
|
||||
return func(vm *otto.Otto) {
|
||||
_ = vm.Set("inputs", inputs)
|
||||
}
|
||||
}
|
||||
|
||||
func (rc *RunContext) vmJob() func(*otto.Otto) {
|
||||
job := rc.getJobContext()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue