mirror of
https://gitea.com/gitea/docs.git
synced 2026-11-07 10:30:32 +00:00
Trim the Actions comparison to actual differences (#638)
`$/` is [GitHub's self-repository prefix](https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#example-using-an-action-in-the-same-repository-as-the-workflow-at-the-running-commit-recommended) with the same semantics, so it is no Gitea addition. The `builtin:checkout` input list was outdated since https://gitea.com/gitea/runner/pulls/1277 made it match `actions/checkout`. Reviewed-on: https://gitea.com/gitea/docs/pulls/638 Reviewed-by: Lunny Xiao <[email protected]> Co-authored-by: silverwind <[email protected]>
This commit is contained in:
1 parent
0ddb9a2071
commit
6135d1dabf
6 files changed
+12
-58
No files matched your search
@@ -19,14 +19,7 @@ Gitea Actions is designed to be compatible with GitHub Actions, with the differe
|
||||
`uses:` accepts these prefixes:
|
||||
|
||||
- `self:` references your own Gitea instance, e.g. `uses: self:owner/repo@v1` or `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:` runs an action built into Gitea Runner, which needs no download and no Node in the job image, e.g. `uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout` accepts the `repository`, `ref`, `token`, `path` and `fetch-depth` inputs of `actions/checkout` with the same defaults, and fails on any other input.
|
||||
|
||||
### Workflow-relative actions
|
||||
|
||||
`$/` references the repository and commit of the workflow, or of the enclosing composite action, e.g. `uses: $/.gitea/actions/build`.
|
||||
Unlike `./`, it needs no checkout first.
|
||||
- `builtin:` runs an action built into Gitea Runner, which needs no download and does not depend on Node.js, e.g. `uses: builtin:checkout`
|
||||
|
||||
### Actions written in Go
|
||||
|
||||
@@ -92,7 +85,7 @@ See [Actions job token permissions](token-permissions.md).
|
||||
|
||||
Actions without a host, like `uses: actions/checkout@v4`, are downloaded from `https://github.com`, or from your own instance when `[actions].DEFAULT_ACTIONS_URL` is `self`.
|
||||
See the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions).
|
||||
For other sources, see [Absolute action URLs](#absolute-action-urls), [Action prefixes](#action-prefixes) and [Workflow-relative actions](#workflow-relative-actions).
|
||||
For other sources, see [Absolute action URLs](#absolute-action-urls) and [Action prefixes](#action-prefixes).
|
||||
|
||||
### Context availability
|
||||
|
||||
|
||||
@@ -21,15 +21,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
|
||||
`uses:`支持以下前缀:
|
||||
|
||||
- `self:`引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:`运行Gitea Runner内置的Action,无需下载,Job镜像中也无需Node,例如`uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout`支持`actions/checkout`的`repository`、`ref`、`token`、`path`和`fetch-depth`输入,默认值相同,其他输入会使步骤失败。
|
||||
|
||||
<a id="workflow-relative-actions"></a>
|
||||
### 相对于工作流的Actions
|
||||
|
||||
`$/`引用工作流所在的仓库和提交,或外层复合Action所在的仓库和提交,例如`uses: $/.gitea/actions/build`。
|
||||
与`./`不同,它无需事先检出代码。
|
||||
- `builtin:`运行Gitea Runner内置的Action,无需下载,也不依赖Node.js,例如`uses: builtin:checkout`
|
||||
|
||||
### 使用Go编写Actions
|
||||
|
||||
@@ -95,7 +87,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
|
||||
|
||||
未指定主机的Actions(如`uses: actions/checkout@v4`)会从`https://github.com`下载,当`[actions].DEFAULT_ACTIONS_URL`为`self`时则从您自己的实例下载。
|
||||
请参阅[配置备忘单](../../administration/config-cheat-sheet.md#actions-actions)。
|
||||
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)、[Action前缀](#action-prefixes)和[相对于工作流的Actions](#workflow-relative-actions)。
|
||||
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)和[Action前缀](#action-prefixes)。
|
||||
|
||||
### 上下文可用性
|
||||
|
||||
|
||||
@@ -21,15 +21,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
|
||||
`uses:`支持以下前缀:
|
||||
|
||||
- `self:`引用您自己的Gitea实例,例如`uses: self:owner/repo@v1`或`uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:`运行Gitea Runner内置的Action,无需下载,Job镜像中也无需Node,例如`uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout`支持`actions/checkout`的`repository`、`ref`、`token`、`path`和`fetch-depth`输入,默认值相同,其他输入会使步骤失败。
|
||||
|
||||
<a id="workflow-relative-actions"></a>
|
||||
### 相对于工作流的Actions
|
||||
|
||||
`$/`引用工作流所在的仓库和提交,或外层复合Action所在的仓库和提交,例如`uses: $/.gitea/actions/build`。
|
||||
与`./`不同,它无需事先检出代码。
|
||||
- `builtin:`运行Gitea Runner内置的Action,无需下载,也不依赖Node.js,例如`uses: builtin:checkout`
|
||||
|
||||
### 使用Go编写Actions
|
||||
|
||||
@@ -95,7 +87,7 @@ Gitea Actions旨在与GitHub Actions兼容,差异如下。
|
||||
|
||||
未指定主机的Actions(如`uses: actions/checkout@v4`)会从`https://github.com`下载,当`[actions].DEFAULT_ACTIONS_URL`为`self`时则从您自己的实例下载。
|
||||
请参阅[配置备忘单](../../administration/config-cheat-sheet.md#actions-actions)。
|
||||
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)、[Action前缀](#action-prefixes)和[相对于工作流的Actions](#workflow-relative-actions)。
|
||||
其他来源请参阅[Action URL绝对路径](#absolute-action-urls)和[Action前缀](#action-prefixes)。
|
||||
|
||||
### 上下文可用性
|
||||
|
||||
|
||||
@@ -21,15 +21,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
|
||||
`uses:` 接受以下前綴:
|
||||
|
||||
- `self:` 參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,Job 映像檔中也不需要 Node,例如 `uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout` 支援 `actions/checkout` 的 `repository`、`ref`、`token`、`path` 和 `fetch-depth` 輸入,預設值相同,其他輸入會使步驟失敗。
|
||||
|
||||
<a id="workflow-relative-actions"></a>
|
||||
### 相對於工作流的 Actions
|
||||
|
||||
`$/` 參照工作流(或外層複合 Action)所在的儲存庫與提交,例如 `uses: $/.gitea/actions/build`。
|
||||
與 `./` 不同,它不需要事先簽出程式碼。
|
||||
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,也不依賴 Node.js,例如 `uses: builtin:checkout`
|
||||
|
||||
### 使用Go編寫Actions
|
||||
|
||||
@@ -95,7 +87,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
|
||||
|
||||
未指定主機的 Actions,例如 `uses: actions/checkout@v4`,會從 `https://github.com` 下載,若 `[actions].DEFAULT_ACTIONS_URL` 為 `self`,則從您自己的實例下載。
|
||||
請參閱[設定速查表](../../administration/config-cheat-sheet.md#actions-actions)。
|
||||
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)、[Action 前綴](#action-prefixes)和[相對於工作流的 Actions](#workflow-relative-actions)。
|
||||
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)和[Action 前綴](#action-prefixes)。
|
||||
|
||||
### 上下文可用性
|
||||
|
||||
|
||||
@@ -21,15 +21,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
|
||||
`uses:` 接受以下前綴:
|
||||
|
||||
- `self:` 參照您自己的 Gitea 實例,例如 `uses: self:owner/repo@v1` 或 `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,Job 映像檔中也不需要 Node,例如 `uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout` 支援 `actions/checkout` 的 `repository`、`ref`、`token`、`path` 和 `fetch-depth` 輸入,預設值相同,其他輸入會使步驟失敗。
|
||||
|
||||
<a id="workflow-relative-actions"></a>
|
||||
### 相對於工作流的 Actions
|
||||
|
||||
`$/` 參照工作流(或外層複合 Action)所在的儲存庫與提交,例如 `uses: $/.gitea/actions/build`。
|
||||
與 `./` 不同,它不需要事先簽出程式碼。
|
||||
- `builtin:` 執行 Gitea Runner 內建的 Action,無需下載,也不依賴 Node.js,例如 `uses: builtin:checkout`
|
||||
|
||||
### 使用Go編寫Actions
|
||||
|
||||
@@ -95,7 +87,7 @@ Gitea Actions 旨在與 GitHub Actions 相容,差異如下。
|
||||
|
||||
未指定主機的 Actions,例如 `uses: actions/checkout@v4`,會從 `https://github.com` 下載,若 `[actions].DEFAULT_ACTIONS_URL` 為 `self`,則從您自己的實例下載。
|
||||
請參閱[設定速查表](../../administration/config-cheat-sheet.md#actions-actions)。
|
||||
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)、[Action 前綴](#action-prefixes)和[相對於工作流的 Actions](#workflow-relative-actions)。
|
||||
其他來源請參閱 [Action URL絕對路徑](#absolute-action-urls)和[Action 前綴](#action-prefixes)。
|
||||
|
||||
### 上下文可用性
|
||||
|
||||
|
||||
@@ -19,14 +19,7 @@ Gitea Actions is designed to be compatible with GitHub Actions, with the differe
|
||||
`uses:` accepts these prefixes:
|
||||
|
||||
- `self:` references your own Gitea instance, e.g. `uses: self:owner/repo@v1` or `uses: self:owner/repo/.gitea/workflows/build.yml@v1`
|
||||
- `builtin:` runs an action built into Gitea Runner, which needs no download and no Node in the job image, e.g. `uses: builtin:checkout`
|
||||
|
||||
`builtin:checkout` accepts the `repository`, `ref`, `token`, `path` and `fetch-depth` inputs of `actions/checkout` with the same defaults, and fails on any other input.
|
||||
|
||||
### Workflow-relative actions
|
||||
|
||||
`$/` references the repository and commit of the workflow, or of the enclosing composite action, e.g. `uses: $/.gitea/actions/build`.
|
||||
Unlike `./`, it needs no checkout first.
|
||||
- `builtin:` runs an action built into Gitea Runner, which needs no download and does not depend on Node.js, e.g. `uses: builtin:checkout`
|
||||
|
||||
### Actions written in Go
|
||||
|
||||
@@ -92,7 +85,7 @@ See [Actions job token permissions](token-permissions.md).
|
||||
|
||||
Actions without a host, like `uses: actions/checkout@v4`, are downloaded from `https://github.com`, or from your own instance when `[actions].DEFAULT_ACTIONS_URL` is `self`.
|
||||
See the [Configuration Cheat Sheet](../../administration/config-cheat-sheet.md#actions-actions).
|
||||
For other sources, see [Absolute action URLs](#absolute-action-urls), [Action prefixes](#action-prefixes) and [Workflow-relative actions](#workflow-relative-actions).
|
||||
For other sources, see [Absolute action URLs](#absolute-action-urls) and [Action prefixes](#action-prefixes).
|
||||
|
||||
### Context availability
|
||||
|
||||
|
||||
Reference in new issue
Block a user