Skip to content

Commit 11a86bb

Browse files
authored
Create action.yml
1 parent 02b3632 commit 11a86bb

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

action.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: 'Setup Node.js environment'
2+
description: 'Setup a Node.js environment by adding problem matchers and optionally downloading and adding it to the PATH.'
3+
author: 'GitHub'
4+
inputs:
5+
always-auth:
6+
description: 'Set always-auth in npmrc.'
7+
default: 'false'
8+
node-version:
9+
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
10+
node-version-file:
11+
description: 'File containing the version Spec of the version to use. Examples: package.json, .nvmrc, .node-version, .tool-versions.'
12+
architecture:
13+
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
14+
check-latest:
15+
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec.'
16+
default: false
17+
registry-url:
18+
description: 'Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN.'
19+
scope:
20+
description: 'Optional scope for authenticating against scoped registries. Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/).'
21+
token:
22+
description: Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. When running this action on github.com, the default value is sufficient. When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
23+
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
24+
cache:
25+
description: 'Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.'
26+
cache-dependency-path:
27+
description: 'Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.'
28+
# TODO: add input to control forcing to pull from cloud or dist.
29+
# escape valve for someone having issues or needing the absolute latest which isn't cached yet
30+
outputs:
31+
cache-hit:
32+
description: 'A boolean value to indicate if a cache was hit.'
33+
node-version:
34+
description: 'The installed node version.'
35+
runs:
36+
using: 'node20'
37+
main: 'dist/setup/index.js'
38+
post: 'dist/cache-save/index.js'
39+
post-if: success()

0 commit comments

Comments
 (0)