From 53596559bee6f606be966afef4f0ad66266685e5 Mon Sep 17 00:00:00 2001 From: SudhanshuSingh <214971+sudhanshusingh@noreply.gitea.com> Date: Sun, 12 Jul 2026 11:27:00 +0000 Subject: [PATCH] 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> --- docs/usage/actions/comparison.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/usage/actions/comparison.md b/docs/usage/actions/comparison.md index f9d77357..26477ce0 100644 --- a/docs/usage/actions/comparison.md +++ b/docs/usage/actions/comparison.md @@ -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). -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 @@ -61,7 +66,7 @@ It's ignored by Gitea Actions now. ### 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