Skip to main content

Getting started with GitHub Actions for GitHub Enterprise Server

Learn about enabling and configuring GitHub Actions on GitHub Enterprise Server for the first time.

Who can use this feature

Site administrators can enable GitHub Actions and configure enterprise settings.

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

About GitHub Actions on GitHub Enterprise Server

This article explains how site administrators can configure GitHub Enterprise Server to use GitHub Actions.

GitHub Actions 默认情况下未为 GitHub Enterprise Server 启用。 You'll need to determine whether your instance has adequate CPU and memory resources to handle the load from GitHub Actions without causing performance loss, and possibly increase those resources. You'll also need to decide which storage provider you'll use for the blob storage required to store artifacts generated by workflow runs. Then, you'll enable GitHub Actions for your enterprise, manage access permissions, and add self-hosted runners to run workflows.

在开始之前,应制定一个计划,了解如何将 GitHub Actions 引入企业。 有关详细信息,请参阅“将 GitHub Actions 引入你的企业”。

如果要将企业从其他提供商迁移到 GitHub Actions,则需要考虑其他注意事项。 有关详细信息,请参阅“将你的企业迁移到 GitHub Actions”。

Review hardware requirements

The CPU and memory resources available to your GitHub Enterprise Server instance determine the number of jobs that can be run concurrently without performance loss. GitHub 建议至少使用 8 个 vCPU 和 64 GB 内存来运行 GitHub Actions。

The peak quantity of concurrent jobs running without performance loss depends on such factors as job duration, artifact usage, number of repositories running Actions, and how much other work your instance is doing not related to Actions. Internal testing at GitHub demonstrated the following performance targets for GitHub Enterprise Server on a range of CPU and memory configurations:

vCPU内存最大并行数
864 GB300 个作业
16128 GB700 个作业
32160 GB1500 个作业
64256 GB2500 个作业
96384 GB4500 个作业
128550 GB5000 个作业

Maximum concurrency was measured using multiple repositories, job duration of approximately 10 minutes, and 10 MB artifact uploads. You may experience different performance depending on the overall levels of activity on your instance.

If you plan to enable GitHub Actions for the users of an existing instance, review the levels of activity for users and automations on the instance and ensure that you have provisioned adequate CPU and memory for your users. For more information about monitoring the capacity and performance of GitHub Enterprise Server, see "Monitoring your appliance."

For more information about minimum hardware requirements for your GitHub Enterprise Server instance, see the hardware considerations for your instance's platform.

有关调整现有实例的资源的详细信息,请参阅“增加存储容量”和“增加 CPU 或内存资源”。

External storage requirements

To enable GitHub Actions on GitHub Enterprise Server, you must have access to external blob storage.

GitHub Actions uses blob storage to store data generated by workflow runs, such as workflow logs and user-uploaded build artifacts. The amount of storage required depends on your usage of GitHub Actions. Only a single external storage configuration is supported, and you can't use multiple storage providers at the same time.

GitHub Actions supports these storage providers:

  • Azure Blob storage
  • Amazon S3
  • S3-compatible MinIO cluster

Note: These are the only storage providers that GitHub supports and can provide assistance with.

还有其他与 S3 API 兼容的存储产品,GitHub 合作伙伴已经将它们自我验证为可以与 GitHub Actions 在 GitHub Enterprise Server 上运行。 有关详细信息,请参阅 GHES 存储合作伙伴存储库。

对于通过 GitHub 技术合作伙伴计划验证的存储产品,存储提供商负责为将存储产品与 GitHub Actions 配合使用提供支持和文档。

Networking considerations

如果为企业启用了 GitHub Actions,则仅支持 HTTP 代理。 不支持 SOCKS5 和 HTTPS 代理。 For more information about using a proxy with GitHub Enterprise Server, see "Configuring an outbound web proxy server."

Enabling GitHub Actions with your storage provider

Follow one of the procedures below to enable GitHub Actions with your chosen storage provider:

Managing access permissions for GitHub Actions in your enterprise

You can use policies to manage access to GitHub Actions. For more information, see "Enforcing GitHub Actions policies for your enterprise."

Adding self-hosted runners

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

To run GitHub Actions workflows, you need to add self-hosted runners. You can add self-hosted runners at the enterprise, organization, or repository levels. For more information, see "Adding self-hosted runners."

Managing which actions can be used in your enterprise

You can control which actions your users are allowed to use in your enterprise. This includes setting up GitHub Connect for automatic access to actions from GitHub.com, or manually syncing actions from GitHub.com.

For more information, see "About using actions in your enterprise."

GitHub Actions 的一般安全性增强

若要详细了解有关 GitHub Actions 的安全做法,请参阅“GitHub Actions 的安全性增强”。

Reserved names

When you enable GitHub Actions for your enterprise, two organizations are created: github and actions. If your enterprise already uses the github organization name, github-org (or github-github-org if github-org is also in use) will be used instead. If your enterprise already uses the actions organization name, github-actions (or github-actions-org if github-actions is also in use) will be used instead. Once actions is enabled, you won't be able to use these names anymore.