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。 对于私有仓库,每个 GitHub 帐户可获得一定数量的免费记录和存储,具体取决于帐户所使用的产品。 超出包含金额的任何使用量都由支出限制控制。 For more information, see "About billing for GitHub Actions."

Availability

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.

  • 工作流程运行时间 - 每个工作流程的运行时限为 72 小时。 如果工作流程运行时间达到此限制,其运行将被取消。

  • 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
    Free205
    Pro405
    Team605
    Enterprise18050
  • Job matrix - 作业矩阵在每次工作流程运行时最多可生成 256 个作业。 此限制也适用于自托管运行器。

  • 工作流程运行队列 - 每个仓库在 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 天。

  • For private repositories: you can change this retention period to anywhere between 1 day or 400 days.

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

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 them to local actions only, which means that people can only use actions that exist in your repository.

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."

此文档对您有帮助吗?

隐私政策

帮助我们创建出色的文档!

所有 GitHub 文档都是开源的。看到错误或不清楚的内容了吗?提交拉取请求。

做出贡献

或者, 了解如何参与。