Safeguard
Developer Tools•

How long does GitHub Actions keep artifacts and logs?

GitHub Actions keeps artifacts and logs for 90 days by default. How to change it, the limits for public and private repos, and the October 2026 change.

Safeguard Security Team
3 min read

GitHub Actions keeps workflow artifacts and build logs for 90 days by default. Public repositories can set 1 to 90 days, private repositories 1 to 400 days. From 1 October 2026 the same retention setting also applies to checks, workflow runs and commit statuses, so review your value now.

The numbers at a glance

ItemDefaultPublic repo rangePrivate repo range
Artifacts and logs90 days1 to 90 days1 to 400 days
Checks, runs, statuses400+ days until 1 Oct 2026, then your setting1 to 90 days1 to 400 days

A custom value only applies to new objects. It does not change the expiry of artifacts and logs that already exist. If an organization or enterprise manages your repository, their cap wins over the repository setting.

Where you can set it

Retention can be set at repository, organization and enterprise level. You can also give a single artifact its own retention period when you upload it with the upload artifact action, which is useful when one file must live longer than the rest of the run.

In the organization UI the path is Settings, then Actions, then General, then the retention field for checks, workflow runs, statuses, artifacts and logs.

Finding out when something expires

The REST API for artifacts returns an expires_at value, so you can list what is about to disappear. If you are preparing an audit or a customer request, check that date before you promise to produce a build log from six months ago.

What deletion does

Deleting an artifact before it expires is permanent: GitHub's documentation warns that it cannot be restored. Deleting a workflow run also deletes every artifact attached to that run.

A practical retention plan

  1. Decide what each item is for. Debug logs rarely need more than a few weeks. Evidence for a release may need years.
  2. Keep short retention for bulky, low value artifacts such as intermediate build output, and save storage.
  3. Copy anything you must keep to a store you control: a release asset, an artifact repository, or an evidence bucket with its own retention rule.
  4. Record the commit, workflow run and digest next to the copy so it can be traced back.
  5. Re-check the setting after policy changes such as the October 2026 one.

For what to archive per release, see what to archive for each software release and what evidence to keep for each release vulnerability scan.

Safeguard's compliance and evidence automation collects scan results and release evidence into one place, so audit proof does not depend on a CI system's expiry clock.

Quick check

Can a public repository keep artifacts for a year?

No. GitHub documents 1 to 90 days for public repositories. Private repositories can go up to 400 days.

Does changing retention fix old artifacts?

No. The new period applies only to artifacts, logs and other objects created after the change.

Sources

Last reviewed: 19 October 2026.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.