Skip to main content

此版本的 GitHub Enterprise Server 已于以下日期停止服务 2023-09-12. 即使针对重大安全问题,也不会发布补丁。 为了获得更好的性能、更高的安全性和新功能,请升级到最新版本的 GitHub Enterprise。 如需升级帮助,请联系 GitHub Enterprise 支持

Using starter workflows

GitHub Enterprise Server provides starter workflows for a variety of languages and tooling.

注意:GitHub Enterprise Server 目前不支持 GitHub 托管的运行器。 可以在 GitHub public roadmap 上查看有关未来支持计划的更多信息。

About starter workflows

Starter workflows are templates that help you to create your own GitHub Actions workflows for a repository. They offer an alternative to starting from a blank workflow file and are useful because some of the work will already have been done for you.

GitHub Enterprise Server offers starter workflows 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. For example, if you use Node.js, GitHub Enterprise Server will suggest a starter workflow file that installs your Node.js packages and runs your tests. You can search and filter to find relevant starter workflows.

GitHub 为以下高级类别提供现成的入门工作流:

  • 部署 (CD) 。 有关详细信息,请参阅“关于持续部署”。

  • 持续集成 (CI) 。 有关详细信息,请参阅“关于持续集成”。

  • 自动化. 自动化入门工作流提供了自动化工作流的解决方案,例如,对拉取请求分类并根据拉取请求中修改的路径对拉取请求应用标签,或问候首次参与存储库的用户。

You can also create your own starter workflow to share with your organization. These starter workflows will appear alongside the GitHub Enterprise Server-provided starter workflows. Anyone with write access to the organization's github repository can set up a starter workflow. For more information, see "为组织创建入门工作流程."

Choosing and using a starter workflow

  1. 在 你的 GitHub Enterprise Server 实例 上,导航到存储库的主页。

  2. 在存储库名称下,单击 “操作”。

    “github/docs”存储库的选项卡的屏幕截图。 “操作”选项卡以橙色边框突出显示。

  3. If you already have a workflow in your repository, click New workflow.

  4. The "Choose a workflow" page shows a selection of recommended starter workflows. Find the starter workflow that you want to use, then click Configure. To help you find the starter workflow that you want, you can search for keywords or filter by category.

  5. If the starter workflow contains comments detailing additional setup steps, follow these steps.

    There are guides to accompany many of the starter workflows for building and testing projects. For more information, see "自动构建和测试."

  6. Some starter workflows use secrets. For example, ${{ secrets.npm_token }}. If the starter workflow uses a secret, store the value described in the secret name as a secret in your repository. For more information, see "在 GitHub Actions 中使用机密."

  7. Optionally, make additional changes. For example, you might want to change the value of on to change when the workflow runs.

  8. Click Start commit.

  9. Write a commit message and decide whether to commit directly to the default branch or to open a pull request.

Further reading