Skip to content

Conversation

@brendanjryan
Copy link
Contributor

Problem

The action fails with:

Error: Some specified paths were not resolved, unable to cache dependencies.

This happens because setup-node@v4's built-in cache: "pnpm" feature doesn't support ${{ github.action_path }} in composite actions. The path resolution fails during the post-step cache save.

Solution

Revert to explicit actions/cache@v4 steps that:

  • Manually hash the lockfile for cache keys
  • Cache both pnpm store and node_modules (including sg binary)
  • Conditionally install only on cache miss

This approach works reliably in composite actions and was the original implementation before d7ce4d7.

Testing

Tested locally that the caching logic properly generates keys and paths using github.action_path.

The setup-node@v4 built-in caching doesn't support github.action_path
in cache-dependency-path, causing 'paths were not resolved' errors.

This reverts to explicit actions/cache@v4 steps that properly handle
caching in composite actions by:
- Manually hashing the lockfile for cache keys
- Caching both pnpm store and node_modules
- Conditionally installing only on cache miss

Fixes the caching failure that prevented the action from running.
@brendanjryan brendanjryan merged commit f665866 into main Jan 19, 2026
1 check passed
@brendanjryan brendanjryan deleted the fix-action-caching branch January 19, 2026 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants