fix(action): hashFiles must use GITHUB_WORKSPACE#2
Conversation
Review Summary by QodoUse glob patterns for lock file hashing
WalkthroughsDescription• Replace specific lock file names with glob patterns • Use *.lock to match all lock files generically • Use *-lock.json to match npm-style lock files • Improves cache key flexibility for different package managers Diagramflowchart LR
A["Specific lock files<br/>bun.lock, package-lock.json"] -- "Replace with globs" --> B["Generic patterns<br/>*.lock, *-lock.json"]
B -- "Improves cache key" --> C["Better multi-package-manager support"]
File Changes1. action.yml
|
Code Review by Qodo
1.
|
This comment was marked as outdated.
This comment was marked as outdated.
Ask❓How could we do without a checkout before the cache ? Answer:You can avoid a checkout before the cache as long as the cache key doesn’t depend on files that only exist in Today the cache key is built with Two ways to remove the pre-cache checkout:
Net: |
This comment was marked as outdated.
This comment was marked as outdated.
Ask❓How can we use hashFiles?
With the restrictions about using only files inside Answer:
In this PR, moving Where the “copy/checkout elsewhere” concern becomes real is when the files you want to hash live in the action’s directory (
So: no extra copy step is needed as long as the hashed inputs are in the checked-out repo (which the PR now enforces by checking out first). If the intent is to hash the action’s own source when used as a remote action, then yes—you need either a secondary checkout into the workspace or a copy into the workspace, because |
GITHUB_WORKSPACE
No description provided.