From 45270656dfb7a0c8b382df3a9e8a212dbe5615d8 Mon Sep 17 00:00:00 2001 From: sillyguodong Date: Fri, 1 Mar 2024 08:33:32 +0000 Subject: [PATCH] Set the status of steps to `skipped` if job is skipped (#500) If a job is detected as skipped, its steps should also be `skipped`. Co-authored-by: Lunny Xiao Reviewed-on: https://gitea.com/gitea/act_runner/pulls/500 Reviewed-by: Lunny Xiao Co-authored-by: sillyguodong Co-committed-by: sillyguodong --- internal/pkg/report/reporter.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/pkg/report/reporter.go b/internal/pkg/report/reporter.go index 7a8658e..0930e88 100644 --- a/internal/pkg/report/reporter.go +++ b/internal/pkg/report/reporter.go @@ -114,6 +114,9 @@ func (r *Reporter) Fire(entry *log.Entry) error { for _, s := range r.state.Steps { if s.Result == runnerv1.Result_RESULT_UNSPECIFIED { s.Result = runnerv1.Result_RESULT_CANCELLED + if jobResult == runnerv1.Result_RESULT_SKIPPED { + s.Result = runnerv1.Result_RESULT_SKIPPED + } } } }