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 <bjoern.brauer@new-work.se>

Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
This commit is contained in:
Markus Wolf 2022-01-21 17:10:26 +01:00 committed by GitHub
parent edd0fb92a7
commit 2eda7c6037
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -7,11 +7,13 @@ type stepStatus int
const ( const (
StepStatusSuccess stepStatus = iota StepStatusSuccess stepStatus = iota
StepStatusFailure StepStatusFailure
StepStatusSkipped
) )
var stepStatusStrings = [...]string{ var stepStatusStrings = [...]string{
"success", "success",
"failure", "failure",
"skipped",
} }
func (s stepStatus) MarshalText() ([]byte, error) { func (s stepStatus) MarshalText() ([]byte, error) {

View File

@ -326,6 +326,8 @@ func (rc *RunContext) newStepExecutor(step *model.Step) common.Executor {
if !runStep { if !runStep {
log.Debugf("Skipping step '%s' due to '%s'", sc.Step.String(), sc.Step.If.Value) 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 return nil
} }