Issue
The setup-bun-with-dependencies action uses bun.lockb in the cache key pattern, but Bun 1.3.0 (and potentially other recent versions) generates bun.lock instead.
Current Behavior
The cache key in setup-bun-with-dependencies/action.yml is:
key: ${{ runner.os }}-bun-${{ inputs.bun-version }}-${{ hashFiles(format('{0}/bun.lockb', inputs.working-directory)) }}
Problem
- Bun 1.3.0 creates
bun.lock (text format) not bun.lockb (binary format)
- The
hashFiles('**/bun.lockb') pattern doesn't match bun.lock, resulting in a cache key based on an empty hash
- This breaks cache invalidation when dependencies change
Suggested Fix
Update the cache key pattern to match both formats:
key: ${{ runner.os }}-bun-${{ inputs.bun-version }}-${{ hashFiles(format('{0}/bun.lock*', inputs.working-directory)) }}
Or more specifically:
key: ${{ runner.os }}-bun-${{ inputs.bun-version }}-${{ hashFiles(format('{0}/bun.lock', inputs.working-directory), format('{0}/bun.lockb', inputs.working-directory)) }}
Context
Discovered while migrating common-resources from npm to bun. The repo has bun.lock and the action works but caching isn't optimally keyed.
Issue
The
setup-bun-with-dependenciesaction usesbun.lockbin the cache key pattern, but Bun 1.3.0 (and potentially other recent versions) generatesbun.lockinstead.Current Behavior
The cache key in
setup-bun-with-dependencies/action.ymlis:Problem
bun.lock(text format) notbun.lockb(binary format)hashFiles('**/bun.lockb')pattern doesn't matchbun.lock, resulting in a cache key based on an empty hashSuggested Fix
Update the cache key pattern to match both formats:
Or more specifically:
Context
Discovered while migrating
common-resourcesfrom npm to bun. The repo hasbun.lockand the action works but caching isn't optimally keyed.