Skip to content
Latchkey

GitHub Actions actions/cache@v3 deprecation warning

The v3 line of actions/cache uses an older cache service backend that GitHub is retiring; runs still work for now but warn, and they will break when the legacy backend is decommissioned.

What this error means

Workflow annotations warn that actions/cache@v3 is deprecated and recommend upgrading to v4. The warning recurs on every run that pins v3.

github-actions
Warning: This version of actions/cache is deprecated. Please upgrade to actions/cache@v4.

Common causes

Pinned to actions/cache@v3

The workflow still references the deprecated v3 major of the cache action.

Transitive use via an old setup action

An older setup-* action internally relies on the deprecated cache backend.

How to fix it

Upgrade to v4

  1. Bump every actions/cache@v3 reference to @v4.
  2. Update setup-* actions to versions that use the new backend.
  3. Confirm cache restore/save still work after the bump.
.github/workflows/ci.yml
- uses: actions/cache@v4
  with:
    path: ~/.npm
    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}

How to prevent it

  • Pin cache actions to a supported major.
  • Keep setup-* actions current.
  • Watch deprecation annotations in CI.

Frequently asked questions

What causes ""cache@v3 deprecated""?
The workflow still references the deprecated v3 major of the cache action.
How do I fix "cache@v3 deprecated"?
Upgrade to v4

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card