mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
Fix typos and grammer problems for actions documentation (#26328)
follow #26317 fix typos and adjust grammer problems.
This commit is contained in:
parent
0da8ebc95b
commit
68c652d8f3
@ -245,7 +245,8 @@ You can find more useful images on [act images](https://github.com/nektos/act/bl
|
||||
If you want to run jobs in the host directly, you can change it to `ubuntu-22.04:host` or just `ubuntu-22.04`, the `:host` is optional.
|
||||
However, we suggest you to use a special name like `linux_amd64:host` or `windows:host` to avoid misusing it.
|
||||
|
||||
After Gitea 1.21 released, you can change labels by modfiying `container.labels` in configuration file (if you don't have a configuration file, please refer to [configuration tutorials](#configuration)), and runner will declare the new labels which you defined in configuration file after executing `./act_runner daemon --config config.yaml`.
|
||||
Starting with Gitea 1.21, you can change labels by modifying `container.labels` in the runner configuration file (if you don't have a configuration file, please refer to [configuration tutorials](#configuration)).
|
||||
The runner will use these new labels as soon as you restart it, i.e., by calling `./act_runner daemon --config config.yaml`.
|
||||
|
||||
## Running
|
||||
|
||||
@ -263,29 +264,31 @@ Since act runner is still in development, it is recommended to check the latest
|
||||
|
||||
## Configuration variable
|
||||
|
||||
You can create configuration varibales with user, organization, repository level. And the level of the variable depends on which setting panel you created in.
|
||||
You can create configuration variables on the user, organization and repository level.
|
||||
The level of the variable depends on where you created it.
|
||||
|
||||
### Naming conventions
|
||||
|
||||
The following rules apply to variable names:
|
||||
|
||||
- Varibale names can only contain alphanumeric characters (`[a-z]`, `[A-Z]`, `[0-9]`) or underscores (`_`). Spaces are not allowed.
|
||||
- Variable names can only contain alphanumeric characters (`[a-z]`, `[A-Z]`, `[0-9]`) or underscores (`_`). Spaces are not allowed.
|
||||
|
||||
- Varibale names must not start with the `GITHUB_` and `GITEA_` prefix.
|
||||
- Variable names must not start with the `GITHUB_` and `GITEA_` prefix.
|
||||
|
||||
- Varibale names must not start with a number.
|
||||
- Variable names must not start with a number.
|
||||
|
||||
- Varibale names are not case-sensitive.
|
||||
- Variable names are case-insensitive.
|
||||
|
||||
- Varibale names must be unique at the level they are created at.
|
||||
- Variable names must be unique at the level they are created at.
|
||||
|
||||
- Varibale names must not be 'CI'.
|
||||
- Variable names must not be `CI`.
|
||||
|
||||
### Using varibales
|
||||
### Using variable
|
||||
|
||||
After creating configuration varibales, they will be automatically filled in the `vars` context. They are available to you with expression like `{{ vars.VARIABLE_NAME }}` in workflow.
|
||||
After creating configuration variables, they will be automatically filled in the `vars` context.
|
||||
They can be accessed through expressions like `{{ vars.VARIABLE_NAME }}` in the workflow.
|
||||
|
||||
### Precedence
|
||||
|
||||
If a variable with the same name exists at multiple levels, the variable at the lowest level takes precedence(the level of organization and user is higher than repository's).
|
||||
For example, if an organization-level variable has the same name as a repository-level variable, then the repository-level variable takes precedence.
|
||||
If a variable with the same name exists at multiple levels, the variable at the lowest level takes precedence:
|
||||
A repository variable will always be chosen over an organization/user variable.
|
||||
|
@ -241,7 +241,7 @@ Runner的标签用于确定Runner可以运行哪些Job以及如何运行它们
|
||||
如果您想直接在主机上运行Job,您可以将其更改为`ubuntu-22.04:host`或仅`ubuntu-22.04`,`:host`是可选的。
|
||||
然而,我们建议您使用类似`linux_amd64:host`或`windows:host`的特殊名称,以避免误用。
|
||||
|
||||
Gitea 1.21 发布后,您可以通过修改配置文件中的 `container.labels` 来更改标签(如果没有配置文件,请参考 [配置教程](#配置)),执行 `./act_runner daemon --config config.yaml` 命令后,它会向 Gitea 声明您在配置文件中定义的新标签。
|
||||
从 Gitea 1.21 开始,您可以通过修改 runner 的配置文件中的 `container.labels` 来更改标签(如果没有配置文件,请参考 [配置教程](#配置)),通过执行 `./act_runner daemon --config config.yaml` 命令重启 runner 之后,这些新定义的标签就会生效。
|
||||
|
||||
## 运行
|
||||
|
||||
@ -259,7 +259,7 @@ Runner将从Gitea实例获取Job并自动运行它们。
|
||||
|
||||
## 变量
|
||||
|
||||
您可以创建用户、组织和仓库级别的变量。变量的级别是取决于你在哪个设置面板中创建它们的。
|
||||
您可以创建用户、组织和仓库级别的变量。变量的级别取决于创建它的位置。
|
||||
|
||||
### 命名规则
|
||||
|
||||
@ -283,5 +283,5 @@ Runner将从Gitea实例获取Job并自动运行它们。
|
||||
|
||||
### 优先级
|
||||
|
||||
如果同名变量存在于多个级别,则级别最低的变量优先(组织和用户的级别高于仓库)。
|
||||
比如,如果组织级变量与仓库级变量同名,则仓库变量优先。
|
||||
如果同名变量存在于多个级别,则级别最低的变量优先。
|
||||
仓库级别的变量总是比组织或者用户级别的变量优先被选中。
|
||||
|
Loading…
Reference in New Issue
Block a user