注:GitHub Enterprise Server 2.22 上的 GitHub Actions 支持是有限的公测版。 测试已结束。 GitHub Actions 现在一般可用于 GitHub Enterprise Server 3.0 或更新版本。 更多信息请参阅 GitHub Enterprise Server 3.0 发行说明。
- 有关升级到 GitHub Enterprise Server 3.0 或更新版本的更多信息,请参阅“升级 GitHub Enterprise Server”。
- 有关在升级后配置 GitHub Actions 的更多信息,请参阅 GitHub Enterprise Server 3.0 的文档。
注: GitHub 托管的运行器目前在 GitHub Enterprise Server 上不受支持。 您可以在 GitHub 公共路线图 上查看有关未来支持计划的更多信息。
关于工作流程模板
GitHub Enterprise Server offers workflow templates for a variety of languages and tooling. When you set up workflows in your repository, GitHub Enterprise Server analyzes the code in your repository and recommends workflows based on the language and framework in your repository. 例如,如果您使用 Node.js,GitHub Enterprise Server 将提议使用模板文件来安装 Node.js 包和运行测试。
You can also create your own workflow templates to share with your organization. For more information, see "Creating workflow templates."
Using workflow templates
Anyone with write permission to a repository can set up GitHub Actions workflows for CI/CD or other automation.
- 在 GitHub Enterprise Server 上,导航到仓库的主页面。
- 在仓库名称下,单击 Actions(操作)。
- If you already have a workflow in your repository, click New workflow.
- Find the template that you want to use, then click Set up this workflow.
- If the workflow template contains comments detailing additional setup steps, follow these steps.
- Some workflow templates use secrets. For example,
${{ secrets.npm_token }}
. If the workflow template uses a secret, store the value described in the secret name as a secret in your repository. 更多信息请参阅“加密密码”。 - Optionally, make additional changes. For example, you might want to change the value of
on
to change when the workflow runs. - 单击 Start commit(开始提交)。
- Write a commit message and decide whether to commit directly to the default branch or to open a pull request.