mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix #134 - support 'env' context in steps
This commit is contained in:
parent
f9befb34a3
commit
8f6d32db71
4 changed files with 14 additions and 4 deletions
|
@ -13,6 +13,7 @@ import (
|
|||
|
||||
"github.com/robertkrimen/otto"
|
||||
"github.com/sirupsen/logrus"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"gopkg.in/godo.v2/glob"
|
||||
)
|
||||
|
||||
|
@ -240,6 +241,7 @@ func (rc *RunContext) vmGithub() func(*otto.Otto) {
|
|||
|
||||
func (sc *StepContext) vmEnv() func(*otto.Otto) {
|
||||
return func(vm *otto.Otto) {
|
||||
log.Debugf("context env => %v", sc.Env)
|
||||
_ = vm.Set("env", sc.Env)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue