From 52253c1afba3c6bfeea92f09376e22e9dcfacef1 Mon Sep 17 00:00:00 2001 From: Markus Wolf Date: Fri, 21 Jan 2022 17:10:26 +0100 Subject: [PATCH] feat: add skipped status as step result (#950) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Co-authored-by: Björn Brauer --- act/model/step_result.go | 2 ++ act/runner/run_context.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/act/model/step_result.go b/act/model/step_result.go index cc44ee6c..86e5ebf3 100644 --- a/act/model/step_result.go +++ b/act/model/step_result.go @@ -7,11 +7,13 @@ type stepStatus int const ( StepStatusSuccess stepStatus = iota StepStatusFailure + StepStatusSkipped ) var stepStatusStrings = [...]string{ "success", "failure", + "skipped", } func (s stepStatus) MarshalText() ([]byte, error) { diff --git a/act/runner/run_context.go b/act/runner/run_context.go index 58cb2ac1..b5b0d434 100644 --- a/act/runner/run_context.go +++ b/act/runner/run_context.go @@ -326,6 +326,8 @@ func (rc *RunContext) newStepExecutor(step *model.Step) common.Executor { if !runStep { log.Debugf("Skipping step '%s' due to '%s'", sc.Step.String(), sc.Step.If.Value) + rc.StepResults[rc.CurrentStep].Conclusion = model.StepStatusSkipped + rc.StepResults[rc.CurrentStep].Outcome = model.StepStatusSkipped return nil }