diff --git a/internal/runner/runner.go b/internal/runner/runner.go index 158c2ce..0216ee1 100644 --- a/internal/runner/runner.go +++ b/internal/runner/runner.go @@ -48,7 +48,7 @@ func (r *Runner) RunWorkflow(workflow workflows.Workflow) TaskTracker { workflow.Walk(func(n interface{}) { switch n.(type) { case workflows.Step: - if useAction := n.(workflows.Step).Use; useAction != "" { + if useAction := n.(workflows.Step).Uses; useAction != "" { actions.NewActionsManager(r.Cache.Root).PrefetchAction(useAction) } } @@ -164,7 +164,7 @@ func (r *Runner) RunJobInContainer(imageUri string, containerId string, jobConte Shell: stepShell, } stepError = r.RunCommandInContainer(containerId, step.Run, commandOptions) - } else if step.Use != "" { + } else if step.Uses != "" { for key, value := range step.With { stepEnv[actions.FormatInputEnvKey(key)] = value } @@ -174,7 +174,7 @@ func (r *Runner) RunJobInContainer(imageUri string, containerId string, jobConte Env: stepEnv, Shell: stepShell, } - stepError = actions.NewActionsManager(r.Cache.Root).UseAction(step.Use, containerId, commandOptions) + stepError = actions.NewActionsManager(r.Cache.Root).UseAction(step.Uses, containerId, commandOptions) } if stepError != nil && !step.ContinueOnError { diff --git a/internal/workflow/models.go b/internal/workflow/models.go index 988d845..023713f 100644 --- a/internal/workflow/models.go +++ b/internal/workflow/models.go @@ -53,7 +53,7 @@ type Step struct { ContinueOnError bool `yaml:"continue-on-error"` Env map[string]string `yaml:"env"` Shell string `yaml:"shell"` - Use string `yaml:"use"` + Uses string `yaml:"uses"` With map[string]string `yaml:"with"` } @@ -64,8 +64,8 @@ func (s Step) Walk(handler func(node interface{})) { func (s Step) Validate() []error { validationErrors := []error{} - if s.Run == "" && s.Use == "" { - validationErrors = append(validationErrors, errors.New("Must have a \"run\" or \"step\" clause.")) + if s.Run == "" && s.Uses == "" { + validationErrors = append(validationErrors, errors.New("Must have a \"run\" or \"uses\" clause.")) } return validationErrors