mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
unit tests
Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
7f5ced76f6
commit
ff5f860cee
464 changed files with 94681 additions and 62523 deletions
|
@ -39,6 +39,7 @@ type ContainerSpec struct {
|
|||
Options string `yaml:"options"`
|
||||
Entrypoint string
|
||||
Args string
|
||||
Name string
|
||||
}
|
||||
|
||||
// Step is the structure of one step in a job
|
||||
|
@ -63,8 +64,8 @@ func (s *Step) GetEnv() map[string]string {
|
|||
rtnEnv[k] = v
|
||||
}
|
||||
for k, v := range s.With {
|
||||
envKey := fmt.Sprintf("INPUT_%s", strings.ToUpper(k))
|
||||
envKey = regexp.MustCompile("[^A-Z0-9]").ReplaceAllString(envKey, "_")
|
||||
envKey := regexp.MustCompile("[^A-Z0-9-]").ReplaceAllString(strings.ToUpper(k), "_")
|
||||
envKey = fmt.Sprintf("INPUT_%s", strings.ToUpper(envKey))
|
||||
rtnEnv[envKey] = v
|
||||
}
|
||||
return rtnEnv
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue