Skip to content

Commit 859dbef

Browse files
Update action.yml
1 parent 5cd8a8c commit 859dbef

1 file changed

Lines changed: 48 additions & 15 deletions

File tree

action.yml

Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,75 +4,108 @@ author: "Ananta Cloud"
44

55
inputs:
66
node-version:
7-
description: "Version spec of Node.js (e.g. 18, 20.x, >=18.0.0)"
7+
description: |
8+
Version spec of Node.js (e.g., '18', '20.x', '>=18.0.0').
9+
If not specified, will attempt to read from node-version-file.
810
required: false
11+
type: string
912

1013
node-version-file:
11-
description: "File containing Node.js version (e.g. .nvmrc, .node-version, package.json, .tool-versions)"
14+
description: |
15+
File containing Node.js version (e.g., .nvmrc, .node-version, package.json, .tool-versions).
16+
Used when node-version is not specified.
1217
required: false
18+
type: string
1319

1420
architecture:
15-
description: "Target architecture (x86, x64, arm64). Defaults to system architecture."
21+
description: "Target architecture. Defaults to system architecture."
1622
required: false
23+
type: choice
24+
default: "x64"
25+
options:
26+
- x86
27+
- x64
28+
- arm64
1729

1830
check-latest:
1931
description: "Check for latest version matching the version spec"
2032
required: false
33+
type: boolean
2134
default: "false"
2235

2336
registry-url:
2437
description: "Registry URL for npm/yarn/pnpm authentication"
2538
required: false
39+
type: string
2640

2741
scope:
28-
description: "Scope for registry authentication (e.g. @my-org)"
42+
description: "Scope for registry authentication (e.g., @my-org)"
2943
required: false
44+
type: string
3045

3146
token:
32-
description: "Token for downloading Node.js or registry authentication"
47+
description: "Token for downloading Node.js or registry authentication. Defaults to github.token."
3348
required: false
34-
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
49+
type: string
3550

3651
cache:
37-
description: "Package manager for caching (npm | yarn | pnpm)"
52+
description: "Package manager to cache (npm | yarn | pnpm). Omit to auto-detect."
3853
required: false
39-
40-
package-manager-cache:
41-
description: "Enable/disable automatic caching"
42-
required: false
43-
default: "true"
54+
type: choice
55+
options:
56+
- npm
57+
- yarn
58+
- pnpm
4459

4560
cache-dependency-path:
46-
description: "Path(s) to dependency files (supports wildcards)"
61+
description: "Path(s) to dependency files for caching (supports wildcards)"
4762
required: false
63+
type: string
4864

4965
mirror:
5066
description: "Alternative mirror URL for Node.js binaries"
5167
required: false
68+
type: string
5269

5370
mirror-token:
5471
description: "Authorization token for mirror downloads"
5572
required: false
73+
type: string
5674

5775
install:
5876
description: "Install dependencies automatically"
5977
required: false
78+
type: boolean
6079
default: "true"
6180

6281
debug:
6382
description: "Enable debug logs"
6483
required: false
84+
type: boolean
6585
default: "false"
6686

6787
outputs:
6888
node-version:
6989
description: "Resolved and installed Node.js version"
90+
91+
cache-hit:
92+
description: "Whether the dependency cache was hit (true/false)"
93+
94+
npm-version:
95+
description: "Resolved npm version"
96+
97+
yarn-version:
98+
description: "Resolved yarn version (if applicable)"
99+
100+
pnpm-version:
101+
description: "Resolved pnpm version (if applicable)"
70102

71103
branding:
72104
color: blue
73105
icon: command
74-
106+
75107
runs:
76-
using: "node20"
108+
using: "node24"
77109
main: "dist/index.js"
78110
post: "dist/post.js"
111+
post-if: always()

0 commit comments

Comments
 (0)