docs: update runs-on expression support in comparison guide (#462)

Reviewed-on: https://gitea.com/gitea/docs/pulls/462
Reviewed-by: wxiaoguang <29147+wxiaoguang@noreply.gitea.com>
Co-authored-by: SudhanshuSingh <214971+sudhanshusingh@noreply.gitea.com>
This commit is contained in:
SudhanshuSingh
2026-07-12 11:27:00 +00:00
committed by Nicolas
parent 70a3b7f602
commit 53596559be

View File

@@ -36,7 +36,12 @@ It's ignored by Gitea Actions now.
See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on). See [Workflow syntax for GitHub Actions](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idruns-on).
Gitea Actions only supports `runs-on: xyz` or `runs-on: [xyz]` now. Gitea Actions supports:
- Static strings: `runs-on: self-hosted`
- Arrays of labels: `runs-on: [linux, self-hosted]`
- String expressions: `runs-on: ${{ github.event_name == 'push' && 'ubuntu-latest' || 'self-hosted' }}`
- Arrays containing expressions: `runs-on: [linux, "${{ github.event_name == 'push' && 'ubuntu-latest' || 'self-hosted' }}"]`
## Missing features ## Missing features
@@ -61,7 +66,7 @@ It's ignored by Gitea Actions now.
### Expressions ### Expressions
For [expressions](https://docs.github.com/en/actions/learn-github-actions/expressions), only [`always()`](https://docs.github.com/en/actions/learn-github-actions/expressions#always) is supported. For [expressions](https://docs.github.com/en/actions/learn-github-actions/expressions), Gitea Actions supports standard GitHub functions (e.g. `success()`, `failure()`, `always()`, `cancelled()`, `format()`, `toJSON()`) and context variables (like `github`, `matrix`, `vars`, `env`).
## Missing UI features ## Missing UI features