docs(action): document stable input and fix output/cache descriptions#1543
Open
kranthipoturaju wants to merge 1 commit intoactions:mainfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates the action’s public documentation/metadata to accurately reflect existing behavior, including exposing the previously undocumented stable input and correcting input/output descriptions to match the implementation.
Changes:
- Documented and exposed the existing
stableinput in bothaction.ymland the README usage example. - Clarified caching-related inputs (
cache,package-manager-cache) to better match current cache behavior and limitations. - Corrected output descriptions for
cache-hit(string semantics, only set when caching runs) andnode-version(always set).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| README.md | Adds stable to the usage snippet so users can discover and configure the existing input. |
| action.yml | Exposes stable as an input and corrects/clarifies caching inputs and output descriptions to match runtime behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Summary
Fixes several inaccuracies in
action.ymlinput/output descriptions and documents the previously undiscoverablestableinput that was already implemented but never exposed to users.Changes
stableinput (new) — Added toaction.ymland the README usage block. Was already consumed bymain.ts(core.getInput('stable'), defaulttrue) and passed toofficial_builds.tsfor LTS alias resolution and manifest filtering. Without this entry, users had no way to know the input existed.cache-hitoutput — Corrected from "A boolean value" to a string'true'/'false'.cache-restore.tscallscore.setOutput('cache-hit', Boolean(cacheKey))which GitHub Actions serialises as a string. Also added that it is only populated when caching is active.node-versionoutput — Added that it is always set.printEnvDetailsAndSetOutput()inutil.tsruns unconditionally and callscore.setOutput('node-version', ...)even when nonode-versioninput is provided.cacheinput — Added "The package manager must be pre-installed." The restore logic throws immediately if the tool is not found on the runner.package-manager-cacheinput — Appended that yarn and pnpm are not auto-detected;getNameFromPackageManagerField()only ever returns'npm'.Motivation
The
stableinput was silently accepted by the action for controlling whether pre-release builds satisfy LTS version specs, but was invisible in bothaction.ymland the README. Users who neededstable: false(e.g. to test against an RC build matching an LTS alias) had no documented way to know this was possible.The output and cache description fixes close the gap between what the code actually does and what the documentation claims.
Impact
stabledefaults totrue, matching the existing hardcoded fallback inmain.ts(core.getInput('stable') || 'true'), so existing workflows are unaffected.Testing
Documentation-only change; no code paths were modified. Verified each description change against the corresponding source file (
main.ts,cache-restore.ts,util.ts,official_builds.ts).Notes
registry-urlstill incorrectly references "project level .npmrc and .yarnrc file" in bothaction.ymland README — the auth file is written toRUNNER_TEMPand no.yarnrcis touched. Left out of scope intentionally.Related issue:
No issue is created as the change is related to documentation improvement only.
Check list: