-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Problem
The setup/yarn action uses save-always: true on actions/cache, which has been deprecated (see actions/cache#1315). This produces deprecation warnings in CI logs.
Proposed Fix
Replace the single actions/cache step with the explicit two-step pattern recommended by the actions/cache maintainers:
actions/cache/restore— restores cachednode_modulesat the startactions/cache/savewithif: always()— saves the cache even on failure (equivalent behavior tosave-always: true)
Diff summary (setup/yarn/action.yml)
- - name: Restore node_modules
- uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb #v5.0.1
+ - name: Restore cached node_modules
+ uses: actions/cache/restore@9255dc7a253b0ccc959486e2bca901246202afeb #v5.0.1
+ with:
+ path: |
+ node_modules
+ src/node_modules
+ key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'src/yarn.lock') }}
+ - name: Save node_modules cache
+ uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb #v5.0.1
+ if: always()
with:
- save-always: true
path: |
node_modules
src/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock', 'src/yarn.lock') }}
- # we faced issues with restoring on partial matches because yarn classic doesn't cleanup properly on install, don't uncomment
- # restore-keys: ${{ runner.os }}-yarn-- Same pin:
@9255dc7a253b0ccc959486e2bca901246202afeb(v5.0.1) - Preserves the "always save" behavior without the deprecated parameter
- Removes the stale
restore-keyscomment (intentionally disabled per prior decision)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels