mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-06 17:40:58 +00:00
cleanup logging
Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
parent
5ad4949607
commit
c44aa2a118
12 changed files with 181 additions and 54 deletions
|
@ -113,6 +113,18 @@ type Step struct {
|
|||
TimeoutMinutes int64 `yaml:"timeout-minutes"`
|
||||
}
|
||||
|
||||
// String gets the name of step
|
||||
func (s *Step) String() string {
|
||||
if s.Name != "" {
|
||||
return s.Name
|
||||
} else if s.Uses != "" {
|
||||
return s.Uses
|
||||
} else if s.Run != "" {
|
||||
return s.Run
|
||||
}
|
||||
return s.ID
|
||||
}
|
||||
|
||||
// GetEnv gets the env for a step
|
||||
func (s *Step) GetEnv() map[string]string {
|
||||
rtnEnv := make(map[string]string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue