Skip to content

Commit 1880694

Browse files
committed
Add content about downloading actions back and following the v1.21
1 parent 9625424 commit 1880694

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,18 @@ Pre and Post steps don't have their own section in the job log user interface.
112112

113113
## Different behavior
114114

115+
### Downloading actions
116+
117+
When `[actions].DEFAULT_ACTIONS_URL` keep default value `github`, Gitea will download relative paths actions from https://github.com, that means
118+
if you use `uses: actions/checkout@v3`, it will download the checkout repository from https://github.com/actions/checkout.git .
119+
If you want to download an actions from another git service sites, you can just use an absolute URL `uses: https://gitea.com/actions/checkout@v3`.
120+
121+
If your Gitea instance is in an intranet without internet connection or a restricted area. You can use absolute URL in workflows.
122+
You can also set `[actions].DEFAULT_ACTIONS_URL = self`, then all relative actions will not be downloaded from github like before,
123+
but will be download from your Gitea instance. That means if your workflow have the syntax `uses: actions/checkout@v3`, it will be downloaded from `[server].ROOT_URL`/actions/checkout.git .
124+
125+
More detail configurations about `[actions].DEFAULT_ACTIONS_URL` could be found at [Configuration Cheat Sheet](administration/config-cheat-sheet.md#actions-actions)
126+
115127
### Context availability
116128

117129
Context availability is not checked, so you can use the env context on more places.

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,15 +120,13 @@ Gitea Actions目前不支持此功能。
120120

121121
### 下载Actions
122122

123-
Gitea Actions默认不从GitHub下载Actions。
124-
"默认" 意味着您在`uses` 字段中不指定主机,如`uses: actions/checkout@v3`
125-
相反,`uses: https://github.com/actions/checkout@v3`是有指定主机的
123+
`[actions].DEFAULT_ACTIONS_URL` 保持默认值为 `github` 时,Gitea将会从 https://github.com 下载相对路径的actions。比如:
124+
如果你使用 `uses: actions/checkout@v3`,Gitea将会从 https://github.com/actions/checkout.git 下载这个 actions 项目
125+
如果你想要从另外一个 Git服务下载actions,你只需要使用绝对URL `uses: https://gitea.com/actions/checkout@v3` 来下载
126126

127-
如果您不进行配置,缺失的主机将填充为`https://gitea.com`
128-
这意味着`uses: actions/checkout@v3`将从[gitea.com/actions/checkout](https://gitea.com/actions/checkout)下载该Action,而不是[github.com/actions/checkout](https://github.com/actions/checkout)
127+
如果你的 Gitea 实例是部署在一个互联网限制的网络中,有可以使用绝对地址来下载 actions。你也可以讲配置项修改为 `[actions].DEFAULT_ACTIONS_URL = self`。这样所有的相对路径的actions引用,将不再会从 github.com 去下载,而会从这个 Gitea 实例自己的仓库中去下载。例如: `uses: actions/checkout@v3` 将会从 `[server].ROOT_URL`/actions/checkout.git 这个地址去下载 actions。
129128

130-
正如前面提到的,这是可配置的。
131-
如果您希望您的运行程序默认从GitHub或您自己的Gitea实例下载动作,您可以通过设置`[actions].DEFAULT_ACTIONS_URL`进行配置。请参阅[配置备忘单](administration/config-cheat-sheet.md#actions-actions)
129+
设置`[actions].DEFAULT_ACTIONS_URL`进行配置。请参阅[配置备忘单](administration/config-cheat-sheet.md#actions-actions)
132130

133131
### 上下文可用性
134132

0 commit comments

Comments
 (0)