Skip to content

Commit 6ed74a3

Browse files
authored
Update docs about DEFAULT_ACTIONS_URL (#29442)
Follow #25581.
1 parent eedb8f4 commit 6ed74a3

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

docs/content/usage/actions/faq.en-us.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,24 @@ It is technically possible to implement, but we need to discuss whether it is ne
4545

4646
## Where will the runner download scripts when using actions such as `actions/checkout@v4`?
4747

48-
You may be aware that there are tens of thousands of [marketplace actions](https://github.com/marketplace?type=actions) in GitHub.
49-
However, when you write `uses: actions/checkout@v4`, it actually downloads the scripts from [gitea.com/actions/checkout](http://gitea.com/actions/checkout) by default (not GitHub).
50-
This is a mirror of [github.com/actions/checkout](http://github.com/actions/checkout), but it's impossible to mirror all of them.
51-
That's why you may encounter failures when trying to use some actions that haven't been mirrored.
48+
There are tens of thousands of [actions scripts](https://github.com/marketplace?type=actions) in GitHub, and when you write `uses: actions/checkout@v4`, it downloads the scripts from [github.com/actions/checkout](http://github.com/actions/checkout) by default.
49+
But what if you want to use actions from other places such as gitea.com instead of GitHub?
5250

5351
The good news is that you can specify the URL prefix to use actions from anywhere.
5452
This is an extra syntax in Gitea Actions.
5553
For example:
5654

57-
- `uses: https://github.com/xxx/xxx@xxx`
5855
- `uses: https://gitea.com/xxx/xxx@xxx`
56+
- `uses: https://github.com/xxx/xxx@xxx`
5957
- `uses: http://your_gitea_instance.com/xxx@xxx`
6058

6159
Be careful, the `https://` or `http://` prefix is necessary!
6260

63-
Alternatively, if you want your runners to download actions from GitHub or your own Gitea instance by default, you can configure it by setting `[actions].DEFAULT_ACTIONS_URL`.
64-
See [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions).
61+
This is one of the differences from GitHub Actions which supports actions scripts only from GitHub.
62+
But it should allow users much more flexibility in how they run Actions.
6563

66-
This is one of the differences from GitHub Actions, but it should allow users much more flexibility in how they run Actions.
64+
Alternatively, if you want your runners to download actions from your own Gitea instance by default, you can configure it by setting `[actions].DEFAULT_ACTIONS_URL`.
65+
See [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions).
6766

6867
## How to limit the permission of the runners?
6968

docs/content/usage/actions/faq.zh-cn.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,25 @@ DEFAULT_REPO_UNITS = ...,repo.actions
4545

4646
## 使用`actions/checkout@v4`等Actions时,Job容器会从何处下载脚本?
4747

48-
您可能知道GitHub上有成千上万个[Actions市场](https://github.com/marketplace?type=actions)
49-
然而,当您编写`uses: actions/checkout@v4`时,它实际上默认从[gitea.com/actions/checkout](http://gitea.com/actions/checkout)下载脚本(而不是从GitHub下载)。
50-
这是[github.com/actions/checkout](http://github.com/actions/checkout)的镜像,但无法将它们全部镜像。
51-
这就是为什么在尝试使用尚未镜像的某些Actions时可能会遇到失败的原因。
48+
GitHub 上有成千上万个 [Actions 脚本](https://github.com/marketplace?type=actions)
49+
当您编写 `uses: actions/checkout@v4` 时,它默认会从 [github.com/actions/checkout](https://github.com/actions/checkout) 下载脚本。
50+
那如果您想使用一些托管在其它平台上的脚本呢,比如在 gitea.com 上的?
5251

5352
好消息是,您可以指定要从任何位置使用Actions的URL前缀。
5453
这是Gitea Actions中的额外语法。
5554
例如:
5655

57-
- `uses: https://github.com/xxx/xxx@xxx`
5856
- `uses: https://gitea.com/xxx/xxx@xxx`
57+
- `uses: https://github.com/xxx/xxx@xxx`
5958
- `uses: http://your_gitea_instance.com/xxx@xxx`
6059

6160
注意,`https://``http://`前缀是必需的!
6261

63-
另外,如果您希望您的Runner默认从GitHub或您自己的Gitea实例下载Actions,可以通过设置 `[actions].DEFAULT_ACTIONS_URL`进行配置
64-
参见[配置速查表](administration/config-cheat-sheet.md#actions-actions)
62+
这是与 GitHub Actions 的一个区别,GitHub Actions 只允许使用托管在 GitHub 上的 actions 脚本
63+
但用户理应拥有权利去灵活决定如何运行 Actions
6564

66-
这是与GitHub Actions的一个区别,但它应该允许用户以更灵活的方式运行Actions。
65+
另外,如果您希望您的 Runner 默认从您自己的 Gitea 实例下载 Actions,可以通过设置 `[actions].DEFAULT_ACTIONS_URL`进行配置。
66+
参见[配置速查表](administration/config-cheat-sheet.md#actions-actions)
6767

6868
## 如何限制Runner的权限?
6969

0 commit comments

Comments
 (0)