此版本的 GitHub Enterprise 已停止服务 2021-09-23. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

Using workflow templates

GitHub Enterprise Server provides workflow templates for a variety of languages and tooling.

注:GitHub Enterprise Server 2.22 上的 GitHub Actions 支持是有限的公测版。 测试已结束。 GitHub Actions 现在一般可用于 GitHub Enterprise Server 3.0 或更新版本。 更多信息请参阅 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.

  1. 在 GitHub Enterprise Server 上,导航到仓库的主页面。
  2. 在仓库名称下,单击 Actions(操作)主仓库导航中的操作选项卡
  3. If you already have a workflow in your repository, click New workflow.
  4. Find the template that you want to use, then click Set up this workflow.
  5. If the workflow template contains comments detailing additional setup steps, follow these steps.
  6. 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. 更多信息请参阅“加密密码”。
  7. Optionally, make additional changes. For example, you might want to change the value of on to change when the workflow runs.
  8. 单击 Start commit(开始提交)
  9. Write a commit message and decide whether to commit directly to the default branch or to open a pull request.

延伸阅读