Fix release workflow hashFiles failure in cache post-action#1912
Merged
Conversation
The Post Cache Cypress binary step in the prepare job was failing because
hashFiles('**/package-lock.json') re-evaluates after the job runs, by which
point the workspace contains node_modules, generated docs, and worktree
leftovers from JamesIves/github-pages-deploy-action. Recursing across all
of that made hashFiles fail with "The template is not valid".
Use the root-scoped package-lock.json (only one exists in this repo) for
both the Cypress binary cache and the Vite build cache keys.
Agent-Logs-Url: https://github.com/Hack23/blacktrigram/sessions/ebbb6ddd-5533-4b82-a333-de9f0299ca5a
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
pethers
May 9, 2026 15:34
View session
Contributor
Dependency Reviewโ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes a release pipeline failure where actions/cache post-action re-evaluated a recursive hashFiles('**/package-lock.json') key and errored after the workspace tree was modified during the job, causing downstream release jobs to be skipped.
Changes:
- Update the Cypress binary cache key to hash only the root
package-lock.json. - Update the Vite build cache key to hash only the root
package-lock.json.
Contributor
๐ธ Automated UI Screenshots๐ Screenshots Captured (8)
๐ฆ Download Screenshots๐ฅ Download all screenshots from workflow artifacts
๐ค Generated by Playwright automation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Prepare Releasejob inrelease.ymlfailed at thePost Cache Cypress binarystep withThe template is not valid ... hashFiles('**/package-lock.json') failed, which skipped all downstream release jobs.actions/cachere-evaluates itskeyexpression in its post-step. By the end of the job the workspace contains a populatednode_modules/, generateddocs/, and the worktree leftovers fromJamesIves/github-pages-deploy-action, and the recursive**glob can no longer traverse the tree cleanly.Changes
.github/workflows/release.yml: scope both cache keys (Cypress binary, Vite build) from**/package-lock.jsonto the rootpackage-lock.jsonโ the only lockfile in the repo.The same pattern still exists in
test-and-report.yml; left untouched here since it has not been observed failing, but worth a follow-up if it surfaces.