Skip to content

Commit

Permalink
addressing feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
KellyMerrick committed Jan 7, 2025
1 parent 1bfd7ab commit b6fe613
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions action/pipeline/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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++
}
Expand All @@ -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
Expand Down

0 comments on commit b6fe613

Please sign in to comment.