Skip to content

Fix release workflow hashFiles failure in cache post-action#1912

Merged
pethers merged 1 commit into
mainfrom
copilot/fix-release-issues
May 9, 2026
Merged

Fix release workflow hashFiles failure in cache post-action#1912
pethers merged 1 commit into
mainfrom
copilot/fix-release-issues

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 9, 2026

The Prepare Release job in release.yml failed at the Post Cache Cypress binary step with The template is not valid ... hashFiles('**/package-lock.json') failed, which skipped all downstream release jobs.

actions/cache re-evaluates its key expression in its post-step. By the end of the job the workspace contains a populated node_modules/, generated docs/, and the worktree leftovers from JamesIves/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.json to the root package-lock.json โ€” the only lockfile in the repo.
key: v2-cypress-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
...
key: v2-${{ runner.os }}-vite-${{ hashFiles('package-lock.json') }}

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.

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>
@pethers pethers marked this pull request as ready for review May 9, 2026 15:34
@pethers pethers self-requested a review as a code owner May 9, 2026 15:34
Copilot AI review requested due to automatic review settings May 9, 2026 15:34
@pethers pethers merged commit 7451dad into main May 9, 2026
8 checks passed
@pethers pethers deleted the copilot/fix-release-issues branch May 9, 2026 15:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

Dependency Review

โœ… No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions github-actions Bot added the infrastructure CI/CD and build infrastructure label May 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 9, 2026

๐Ÿ“ธ Automated UI Screenshots

๐Ÿ“‹ Screenshots Captured (8)

# Screenshot
1 01-splash-screen.png - 01 splash screen.png
2 02-intro-screen-menu.png - 02 intro screen menu.png
3 03-intro-screen-archetype-selector.png - 03 intro screen archetype selector.png
4 04-controls-screen.png - 04 controls screen.png
5 05-philosophy-screen.png - 05 philosophy screen.png
6 06-training-screen.png - 06 training screen.png
7 07-combat-screen-practice.png - 07 combat screen practice.png
8 08-combat-screen-versus.png - 08 combat screen versus.png

๐Ÿ“ฆ Download Screenshots

๐Ÿ“ฅ Download all screenshots from workflow artifacts

Screenshots are preserved as workflow artifacts for 30 days.


๐Ÿค– Generated by Playwright automation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure CI/CD and build infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants