diff --git a/action/pipeline/exec.go b/action/pipeline/exec.go index ee0baae6..f8158b11 100644 --- a/action/pipeline/exec.go +++ b/action/pipeline/exec.go @@ -118,16 +118,8 @@ func (c *Config) Exec(client compiler.Engine) error { // create a slice for steps to be removed stepsToRemove := c.SkipSteps - // print steps to be removed to the user - if len(stepsToRemove) > 0 { - for _, stepName := range stepsToRemove { - fmt.Println("skip step: ", stepName) - } - } - // filter out steps to be removed if len(_pipeline.Stages) > 0 { - // if using stages // counter for total steps to run totalSteps := 0 @@ -137,8 +129,6 @@ func (c *Config) Exec(client compiler.Engine) error { for _, step := range stage.Steps { // if c.steps contains step.Name if !slices.Contains(stepsToRemove, step.Name) { - fmt.Println("skip step: ", stepsToRemove) - filteredStageSteps = append(filteredStageSteps, step) totalSteps++ } @@ -157,12 +147,17 @@ func (c *Config) Exec(client compiler.Engine) error { for _, step := range _pipeline.Steps { if !slices.Contains(stepsToRemove, step.Name) { - fmt.Println("skip step: ", stepsToRemove) - filteredSteps = append(filteredSteps, step) } } + // print steps to be removed to the user + if len(stepsToRemove) > 0 { + for _, stepName := range stepsToRemove { + fmt.Println("skip step5: ", stepName) + } + } + _pipeline.Steps = filteredSteps // check if any steps are left to run, excluding "init" step