aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsillyguodong <33891828+sillyguodong@users.noreply.github.com>2024-03-01 21:23:53 +0800
committerGitHub <noreply@github.com>2024-03-01 13:23:53 +0000
commitcee08f634746d65ce3fb05a32dd2439f241a92e6 (patch)
treeecba5b03593343ea78aac07dc3b331ae2bf83424
parent194479a7416cffdc151e6b75a895d566e5970dca (diff)
downloadgitea-cee08f634746d65ce3fb05a32dd2439f241a92e6.tar.gz
gitea-cee08f634746d65ce3fb05a32dd2439f241a92e6.zip
Set pre-step status to `skipped` if job is skipped (#29489)
close #27496 1. Set pre-step (Set up job) status to `skipped` if job is skipped. 2. Apart from pre-step, the other steps should also be set to `skipped`. The status of other steps are reported from the runner side. This will be completed by this PR: https://gitea.com/gitea/act_runner/pulls/500 before: ![image](https://github.com/go-gitea/gitea/assets/33891828/4bac2ba9-66de-4679-b7ed-fbae459c0c54) after: ![image](https://github.com/go-gitea/gitea/assets/33891828/ead4871a-4e0f-4bb1-9fb4-37f4fdb78dfc)
-rw-r--r--modules/actions/task_state.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/actions/task_state.go b/modules/actions/task_state.go
index cbbc0b357d..fe925bbb5d 100644
--- a/modules/actions/task_state.go
+++ b/modules/actions/task_state.go
@@ -35,6 +35,9 @@ func FullSteps(task *actions_model.ActionTask) []*actions_model.ActionTaskStep {
} else if task.Status.IsDone() {
preStep.Stopped = task.Stopped
preStep.Status = actions_model.StatusFailure
+ if task.Status.IsSkipped() {
+ preStep.Status = actions_model.StatusSkipped
+ }
}
logIndex += preStep.LogLength