docs: document self:, builtin:, $/ and runner tracing (#553)

Documents the `self:` and `builtin:` action prefixes from https://github.com/go-gitea/gitea/pull/39358, https://gitea.com/gitea/runner/pulls/1233 and https://gitea.com/gitea/runner/pulls/871, workflow-relative `$/` actions, and the runner's OpenTelemetry tracing from https://gitea.com/gitea/runner/pulls/1206.

1. Trims the action resolution and `DEFAULT_ACTIONS_URL` docs to state each fact once.
1. Drops outdated runner content from the FAQ and design pages.
1. Syncs zh-cn and zh-tw, including a port of the token permissions page they now link to.

_Written by Claude._

Reviewed-on: https://gitea.com/gitea/docs/pulls/553
Reviewed-by: bircni <[email protected]>
Co-authored-by: silverwind <[email protected]>
This commit is contained in:
silverwind authored and bircni committed 2026-09-25 02:51:09 +00:00
1 parent f9124b16db
commit c4caf767ad
19 files changed
+476 -444

No files matched your search

@@ -19,7 +19,7 @@ Gitea Runner部分基於[nektos/act](https://github.com/nektos/act)的硬分支
之前,我們提到工作流文件中的 `runs-on: ubuntu-latest` 表示該Job將在具有`ubuntu-latest`標籤的Runner上運行。
但是,Runner如何知道要運行 `ubuntu-latest`?答案在於將標籤映射到環境。
這就是為什麼在註冊過程中添加自訂標籤時,需要輸入一些複雜內容,比如`my_custom_label:docker://centos:7`。
這就是為什麼Runner的每個標籤都指定了一個環境,比如`my_custom_label:docker://centos:7`。
這意味著Runner可以接受需要在`my_custom_label`上運行的Job,並通過使用`centos:7`鏡像的Docker容器來運行它。
然而,Docker不是唯一的選擇。
@@ -35,7 +35,6 @@ Runner 也支援直接在主機上運行Job。
- `my_custom_label:docker://node:18`:使用`node:18 Docker`鏡像運行帶有`my_custom_label`標籤的Job。
- `my_custom_label:host`:在主機上直接運行帶有`my_custom_label`標籤的Job。
- `my_custom_label`:等同於`my_custom_label:host`。
- `my_custom_label:vm:ubuntu-latest`:(僅為範例,未實現)使用帶有`ubuntu-latest` ISO的虛擬機運行帶有`my_custom_label`標籤的Job。
## 通信協議
@@ -44,7 +43,7 @@ Runner 也支援直接在主機上運行Job。
相反,我們希望重用HTTP端口,這意味著我們需要一個與HTTP相容的協議。
因此,我們選擇使用基於HTTP的gRPC。
我們使用[actions-proto-def](https://gitea.com/gitea/actions-proto-def) 和 [actions-proto-go](https://gitea.com/gitea/actions-proto-go) 進行連接。
協議定義於[actions-proto-def](https://gitea.com/gitea/actions-proto-def),其Go程式碼位於[actionslib](https://gitea.com/gitea/actionslib)。
有關 gRPC 的更多資訊,請前往[其官方網站](https://grpc.io/)。
## 網路架構
@@ -72,8 +71,8 @@ Runner 必須能夠連接到Gitea以接收任務併發送執行結果回來。
### 連接 3,runner到互聯網
當您使用諸如 `actions/checkout@v4` 的一些Actions時,runner 下載的是腳本,而不是Job容器。
預設情況下,它從[github.com](http://github.com/)下載,因此需要訪問互聯網。如果您設定的是 self,
那麼預設將從您的當前Gitea實例下載,那麼此步驟不需要連接到互聯網。
預設情況下,它從[github.com](https://github.com/)下載,因此需要訪問互聯網。
若將`DEFAULT_ACTIONS_URL`設定為`self`,或使用`uses: self:owner/repo@ref`,則改從您的Gitea實例下載。
它還預設從Docker Hub下載一些Docker鏡像,這也需要互聯網訪問。
然而,互聯網訪問並不是絕對必需的。