mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-25 14:13:40 +09:00
Updates actionslib to https://gitea.com/gitea/actionslib/releases/tag/v1.2.1, moves workflow parsing into it and aligns behaviour with GitHub. 1. `uses:` supports `self:` (Gitea-only feature) and `$/` paths. 1. `strategy`, `matrix`, `max-parallel` and `fail-fast` accept expressions, including over `needs`. A job whose `name`, `runs-on` or `continue-on-error` reads `needs` is resolved once they finish. 1. A job `if:` may only read `github`, `needs`, `vars` and `inputs` and is decided before the matrix, as on github.com. 1. Matrix `fail-fast` cancels the other combinations, and `always()` jobs keep running when a run is cancelled. 1. Invalid workflow files, including a malformed `on:` and unknown or cyclic `needs`, show up on push as failed runs with the error. 1. A job whose `if:` or `concurrency:` fails to evaluate is skipped or failed with the error, instead of staying blocked. 1. Reusable workflows: a missing and an unreadable repository fail alike, public callers cannot use private workflows, nested jobs cannot exceed the caller's token permissions. 1. Runner labels match case-insensitively, and `runs-on` accepts an array from an expression. Runner PR: https://gitea.com/gitea/runner/pulls/1247 Docs PR: https://gitea.com/gitea/docs/pulls/553 Fixes: https://github.com/go-gitea/gitea/issues/38990 Fixes: https://github.com/go-gitea/gitea/issues/39382 Fixes: https://github.com/go-gitea/gitea/issues/32364 Fixes: https://github.com/go-gitea/gitea/issues/36077 Fixes: https://github.com/go-gitea/gitea/issues/23277 Fixes: https://github.com/go-gitea/gitea/issues/29020 Co-authored-by: Claude (Opus 5) <noreply@anthropic.com> Co-authored-by: Zettat123 <zettat123@gmail.com>
47 lines
1.8 KiB
Handlebars
47 lines
1.8 KiB
Handlebars
<div id="runWorkflowDispatchModalInputs">
|
|
{{if not .WorkflowDispatchConfig}}
|
|
<div class="ui error message tw-block">{{/* using "ui message" in "ui form" needs to force to display */}}
|
|
{{if not .CurWorkflowExists}}
|
|
{{ctx.Locale.Tr "actions.workflow.not_found" $.CurWorkflow}}
|
|
{{else}}
|
|
{{ctx.Locale.Tr "actions.workflow.has_no_workflow_dispatch" $.CurWorkflow}}
|
|
{{end}}
|
|
</div>
|
|
{{else}}
|
|
{{range $item := .WorkflowDispatchInputs}}
|
|
<div class="ui field {{if .Required}}required{{end}}">
|
|
{{if eq .Type "choice"}}
|
|
<label>{{or .Description .Name}}:</label>
|
|
<select class="ui search selection dropdown" name="{{.Name}}">
|
|
{{range .Options}}
|
|
<option value="{{.}}" {{if eq $item.Default .}}selected{{end}}>{{.}}</option>
|
|
{{end}}
|
|
</select>
|
|
{{else if eq .Type "boolean"}}
|
|
<label class="tw-flex flex-text-inline">
|
|
<input type="checkbox" name="{{.Name}}" {{if eq .Default "true" "True" "TRUE"}}checked{{end}}>
|
|
{{or .Description .Name}}
|
|
</label>
|
|
{{else if eq .Type "number"}}
|
|
<label>{{or .Description .Name}}:</label>
|
|
<input type="number" step="any" name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}>
|
|
{{else}}
|
|
<label>{{or .Description .Name}}:</label>
|
|
<input name="{{.Name}}" value="{{.Default}}" {{if .Required}}required{{end}}>
|
|
{{end}}
|
|
</div>
|
|
{{end}}
|
|
<div class="ui field">
|
|
{{/* use autofocus here to prevent the "branch selection" dropdown from getting focus, otherwise it will auto popup */}}
|
|
<button class="ui tiny primary button" autofocus type="submit">{{ctx.Locale.Tr "actions.workflow.run"}}</button>
|
|
</div>
|
|
{{end}}
|
|
{{range .workflows}}
|
|
{{if and .ErrMsg (eq .EntryName $.CurWorkflow)}}
|
|
<div class="ui field">
|
|
<div>{{svg "octicon-alert" 16 "tw-text-red"}} {{.ErrMsg}}</div>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
</div>
|