Skip to content

chore(yarn-install): upgraded actions/cache action, deduped yarn version check - #185

Open
fearphage wants to merge 4 commits into
backstage:mainfrom
fearphage:upgrade-cache-action
Open

chore(yarn-install): upgraded actions/cache action, deduped yarn version check#185
fearphage wants to merge 4 commits into
backstage:mainfrom
fearphage:upgrade-cache-action

Conversation

@fearphage

Copy link
Copy Markdown
Contributor
  • Upgraded actions/cache to the latest (v6.1.0)
    This version was released June 26.
  • Reduced yarn version checks to a single invocation that sets the appropriate variables for future steps

Motivation

Node v20 is deprecated. This will get rid of some of the following warnings:

2026-08-06_08-52

@fearphage fearphage closed this Aug 6, 2026
@fearphage fearphage reopened this Aug 6, 2026

@freben freben left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for updating the cache action. The cache pin itself resolves correctly to actions/cache v6.1.0, but the Yarn refactor has blocking issues:

  • The Yarn 1 install flag is misspelled as --fronzen-lockfile.
  • The modern Yarn branch changes --immutable to the deprecated --frozen-lockfile alias; it should retain --immutable.
  • The existing quoted regex, [[ "$(yarn --version)" =~ "1.*" ]], does not match a normal version such as 1.22.22. That sends Yarn 1 through the modern branch, where yarn config get cacheFolder may return undefined.

Please capture the version once, use an anchored Yarn 1 check such as ^1., keep --frozen-lockfile for Yarn 1 and --immutable for modern Yarn, and add or run smoke coverage for both paths. The fork CI workflow also still needs approval and a real run.

@fearphage

Copy link
Copy Markdown
Contributor Author

@freben Updated. I tested this one locally:

➜  backstage-actions git:(upgrade-cache-action) bash -c 'for x in 1.2.3 2.3.4 10.11.12; do if [[ "$x" =~ ^1\. ]]; then echo "matched -> $x"; else echo "NO go -> $x"; fi; done'
matched -> 1.2.3
NO go -> 2.3.4
NO go -> 10.11.12

@fearphage
fearphage requested a review from freben September 4, 2026 13:55
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