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.
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
- Bump every actions/cache@v3 reference to @v4.
- Update setup-* actions to versions that use the new backend.
- Confirm cache restore/save still work after the bump.
- 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.