mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-09 00:30:28 +00:00
fix: skip jobs whose if fails to evaluate, update actionslib (#1247)
Updates actionslib to https://gitea.com/gitea/actionslib/releases/tag/v1.2.1. 1. A job whose `if:` fails to evaluate, like `fromJSON` of an invalid job output, is skipped with the error in its log instead of failing, like on GitHub Actions. 1. Workflows the runner reads itself, like with `exec`, are rejected when an expression does not parse, like an unclosed `${{` or an unknown context, instead of failing later. 1. Task payloads from Gitea are read without that check, because they hold evaluated text that may contain `${{`. 1. `if: False`, `if: ~` and other boolean, null or number conditions work. Gitea PR: https://github.com/go-gitea/gitea/pull/39358 Reviewed-on: https://gitea.com/gitea/runner/pulls/1247 Reviewed-by: bircni <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
1 parent
e0d00e543d
commit
98816a605c
5 files changed
+13
-8
No files matched your search
@@ -15,7 +15,7 @@ import (
|
||||
)
|
||||
|
||||
func generateWorkflow(task *runnerv1.Task) (*model.Workflow, string, error) {
|
||||
workflow, err := model.ReadWorkflow(bytes.NewReader(task.WorkflowPayload))
|
||||
workflow, err := model.ReadWorkflowPayload(bytes.NewReader(task.WorkflowPayload))
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user