Skip to main content

Usage limits, billing, and administration

There are usage limits for GitHub Actions workflows. Usage charges apply to repositories that go beyond the amount of free minutes and storage for a repository.

About billing for GitHub Actions

GitHub Actions 帮助您在您存储代码的同一位置自动执行软件开发工作流程,并协作处理拉取请求和议题。 您可以写入个别任务,称为操作,并结合它们创建一个自定义的工作流程。 For more information, see "Understanding GitHub Actions."

公共仓库和自托管运行器免费使用 GitHub Actions。 对于私有仓库,每个 GitHub 帐户可获得一定数量的免费记录和存储,具体取决于帐户所使用的产品。 超出包含金额的任何使用量都由支出限制控制。 For more information, see "About billing for GitHub Actions."


GitHub Actions is available on all GitHub products, but GitHub Actions is not available for private repositories owned by accounts using legacy per-repository plans. 更多信息请参阅“GitHub 的产品”。

Usage limits

There are some limits on GitHub Actions usage when using GitHub-hosted runners. These limits are subject to change.

Note: For self-hosted runners, different usage limits apply. For more information, see "About self-hosted runners."

  • Job execution time - Each job in a workflow can run for up to 6 hours of execution time. If a job reaches this limit, the job is terminated and fails to complete.

  • Workflow run time - Each workflow run is limited to 35 days. 如果工作流程运行时间达到此限制,其运行将被取消。 This period includes execution duration, and time spent on waiting and approval.

  • API 请求 - 在一个仓库的所有操作中,一个小时内最多可执行 1000 个 API 请求。 如果超出,额外的 API 调用将失败,这可能导致作业失败。

  • Concurrent jobs - The number of concurrent jobs you can run in your account depends on your GitHub plan, as indicated in the following table. If exceeded, any additional jobs are queued.

    GitHub planTotal concurrent jobsMaximum concurrent macOS jobs
  • Job matrix - 作业矩阵在每次工作流程运行时最多可生成 256 个作业。 This limit applies to both GitHub-hosted and self-hosted runners.

  • 工作流程运行队列 - 每个仓库在 10 秒的间隔内可排队的工作流程运行不超过 500 个。 如果工作流程运行达到此限制,该工作流程运行将会终止而无法完成。

Usage policy

In addition to the usage limits, you must ensure that you use GitHub Actions within the GitHub Terms of Service. For more information on GitHub Actions-specific terms, see the GitHub Additional Product Terms.

Billing for reusable workflows

If you reuse a workflow, billing is always associated with the caller workflow. Assignment of GitHub-hosted runners is always evaluated using only the caller's context. The caller cannot use GitHub-hosted runners from the called repository.

For more information see, "Reusing workflows."

Artifact and log retention policy

You can configure the artifact and log retention period for your repository, organization, or enterprise account.

默认情况下,工作流程生成的构件和日志文件将保留 90 天,然后自动删除。 您可以根据仓库类型调整保留期:

  • 对于公共仓库:您可以将此保留期更改为 1 至 90 天。
  • 对于私有 存储库:您可以将此保留期更改为 1 天或 400 天之间的任何保留期。

自定义保留期时,它仅适用于新构件和日志文件,并且不追溯性地应用于现有对象。 对于托管的仓库和组织,最长保留期不能超过管理组织或企业设置的限制。

For more information, see:

Disabling or limiting GitHub Actions for your repository or organization

默认情况下,GitHub Actions 将在所有仓库和组织上启用。 You can choose to disable GitHub Actions or limit it to actions and reusable workflows in your organization.

For more information, see:

Disabling and enabling workflows

You can enable and disable individual workflows in your repository on GitHub.

为防止不必要的工作流程运行,可能会自动禁用计划的工作流程。 在复刻公共仓库时,默认情况下将禁用计划的工作流程。 在公共仓库中,当 60 天内未发生仓库活动时,将自动禁用计划的工作流程。

For more information, see "Disabling and enabling a workflow."