Actions 保留策略将覆盖检查、工作流运行和状态
英文标题:Actions retention will cover checks, workflow runs, and statuses
GitHub 将从 2026 年 10 月 1 日起,将检查、工作流运行和状态纳入 GitHub Actions 保留策略管理,默认保留期为 90 天。此前,这些数据无论保留配置如何都会保存 400 天以上;变更后,它们将随仓库、组织或企业配置的构件和日志保留期自动清理。该调整有助于减少 GitHub Actions 中的陈旧数据,并可能降低部分仓库的可计费 Actions 存储使用量。开发者应在变更生效前核查保留设置,并导出或归档需要长期保存的数据。
134.6 KB
中文
自 2026 年 10 月 1 日起,检查、工作流运行和状态将由同一项 Actions 保留设置管理;该设置目前已用于控制构件和日志的保存时长,默认值为 90 天。此前,无论你的保留配置为何,检查、工作流运行和状态都会保留 400 天以上。变更生效后,一旦超过为仓库、组织或企业配置的构件和日志保留期,这些数据将被自动清理。
这项变更将减少 GitHub Actions 中存储的陈旧数据量,帮助所有用户维持检查、工作流运行和状态的速度与可靠性。
- 检查、工作流运行和状态将遵循你的 Actions 保留设置。 它们在超过已配置的构件和日志保留期后将被清理,而不再保留 400 天以上。
- 保留设置现在具有更广的适用范围。 UI 中的设置标签将更新为“检查、工作流运行、状态、构件和日志保留”,以反映其现在管理全部五类数据。
- 保留上限仍然适用。 仓库只能将保留期提高至组织和企业级别配置的上限。对于公开仓库,检查、工作流运行和状态的最长保留期为 90 天,与构件和日志的现有限制一致。
- 该变更不追溯既往数据。 调整保留设置不会恢复此前因保留策略而被清除的数据。这与当前构件和日志保留机制的行为一致。
构件和日志会计入你的可计费 GitHub Actions 存储。由于此次变更会在数据超过保留期后进行清理,先前将构件和日志保存时间超过其配置保留期的仓库,可能会看到可计费 Actions 存储用量下降。
在审查保留设置时,请注意以下事项:
- 降低保留期会更早删除构件和日志,从而可能降低 Actions 存储成本。
- 提高保留期会使构件和日志可用更长时间,并可能增加可计费 Actions 存储。检查、工作流运行和状态的元数据不计入存储费用,但与之关联的构件和日志会计费。
对于大多数仓库,无需采取任何操作。从 10 月 1 日起,检查、工作流运行和状态将根据你已配置的保留设置进行清理。
为做好准备:
- 在 2026 年 10 月 1 日前审查 Actions 保留设置,包括仓库、组织或企业级别的设置。确认其符合你需要保留检查、工作流运行和状态的时长。
- 如果需要更长的保留窗口,请提高保留期,但不得超过组织和企业上限允许的最大值(公开仓库为 90 天)。请注意,更长的保留期会使构件和日志保存更久,并可能增加可计费 Actions 存储。
- 导出或归档任何需要在配置保留期之外保存的数据,因为此次变更生效后,较早的检查、工作流运行和状态将被自动删除。
English / 原文
Starting October 1, 2026, checks, workflow runs, and statuses will be governed by the same Actions retention setting that already controls how long artifacts and logs are kept, with a default of 90 days. Until now, checks, workflow runs, and statuses were retained for 400+ days regardless of your retention configuration. After this change, they will automatically be cleaned up once they pass the artifact and log retention period configured for your repository, organization, or enterprise.
This change reduces the amount of stale data stored across GitHub Actions, helping keep checks, workflow runs, and statuses fast and reliable for everyone.
- Checks, workflow runs, and statuses will follow your Actions retention setting. They will be cleaned up once they exceed your configured artifact and log retention period, instead of sticking around for 400+ days.
- The retention setting now has a broader scope. The setting label in the UI will be updated to read “Check, workflow run, status, artifact and log retention” to reflect that it now governs all five.
- Retention caps still apply. A repository can raise its retention only up to the cap configured at the organization and enterprise level. For public repositories, the maximum retention for checks, workflow runs, and statuses is 90 days, matching the existing limit for artifacts and logs.
- The change is not retroactive. Adjusting your retention setting will not restore data that was previously evicted due to a retention policy. This matches how artifact and log retention behaves today.
Artifacts and logs count toward your billable GitHub Actions storage. Because this change cleans up data once it passes your retention period, repositories that previously kept artifacts and logs around longer than their configured setting may see a reduction in billable Actions storage usage.
Keep this in mind when you review your retention setting:
- Lowering your retention period removes artifacts and logs sooner, which can reduce your Actions storage costs.
- Raising your retention period keeps artifacts and logs available longer, which may increase your billable Actions storage. Checks, workflow run, and statuses metadata are not billed for storage, but the artifacts and logs associated with them are.
For most repositories, no action is required. Starting on October 1, checks, workflow runs, and statuses will be cleaned up according to the retention setting you already have configured.
To prepare:
- Review your Actions retention setting for your repository, organization, or enterprise before October 1, 2026. Confirm it reflects how long you need checks, workflow runs, and statuses to remain available.
- Increase the retention period if you need a longer window , up to the maximum allowed by your organization and enterprise caps (90 days for public repositories). Note that a longer retention period keeps artifacts and logs longer and may increase your billable Actions storage.
- Export or archive anything you need to keep beyond your configured retention period, since older checks, workflow runs, and statuses will be automatically removed once this change takes effect.