Skip to content

Commit 2eda7c6

Browse files
feat: add skipped status as step result (#950)
Github sets the outcome and conclusion to skipped and this PR does the same during the pipeline run for the StepResults in act. Co-authored-by: Björn Brauer <[email protected]> Co-authored-by: Björn Brauer <[email protected]>
1 parent edd0fb9 commit 2eda7c6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pkg/model/step_result.go

+2
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ type stepStatus int
77
const (
88
StepStatusSuccess stepStatus = iota
99
StepStatusFailure
10+
StepStatusSkipped
1011
)
1112

1213
var stepStatusStrings = [...]string{
1314
"success",
1415
"failure",
16+
"skipped",
1517
}
1618

1719
func (s stepStatus) MarshalText() ([]byte, error) {

pkg/runner/run_context.go

+2
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,8 @@ func (rc *RunContext) newStepExecutor(step *model.Step) common.Executor {
326326

327327
if !runStep {
328328
log.Debugf("Skipping step '%s' due to '%s'", sc.Step.String(), sc.Step.If.Value)
329+
rc.StepResults[rc.CurrentStep].Conclusion = model.StepStatusSkipped
330+
rc.StepResults[rc.CurrentStep].Outcome = model.StepStatusSkipped
329331
return nil
330332
}
331333

0 commit comments

Comments
 (0)