Skip to content

Commit 9d255ef

Browse files
Adjust usage section (#734)
1 parent e828f9b commit 9d255ef

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

README.md

+63
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,69 @@ This action provides the following functionality for GitHub Actions users:
1616

1717
See [action.yml](action.yml)
1818

19+
<!-- start usage -->
20+
```yaml
21+
- uses: actions/setup-node@v3
22+
with:
23+
# Version Spec of the version to use in SemVer notation.
24+
# It also emits such aliases as lts, latest, nightly and canary builds
25+
# Examples: 12.x, 10.15.1, >=10.15.0, lts/Hydrogen, 16-nightly, latest, node
26+
node-version: ''
27+
28+
# File containing the version Spec of the version to use. Examples: .nvmrc, .node-version, .tool-versions.
29+
# If node-version and node-version-file are both provided the action will use version from node-version.
30+
node-version-file: ''
31+
32+
# Set this option if you want the action to check for the latest available version
33+
# that satisfies the version spec.
34+
# It will only get affect for lts Nodejs versions (12.x, >=10.15.0, lts/Hydrogen).
35+
# Default: false
36+
check-latest: false
37+
38+
# Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.
39+
# Default: ''. The action use system architecture by default
40+
architecture: ''
41+
42+
# Used to pull node distributions from https://github.com/actions/node-versions.
43+
# Since there's a default, this is typically not supplied by the user.
44+
# When running this action on github.com, the default value is sufficient.
45+
# When running on GHES, you can pass a personal access token for github.com if you are experiencing rate limiting.
46+
#
47+
# We recommend using a service account with the least permissions necessary. Also
48+
# when generating a new PAT, select the least scopes necessary.
49+
#
50+
# [Learn more about creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
51+
#
52+
# Default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
53+
token: ''
54+
55+
# Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.
56+
# Package manager should be pre-installed
57+
# Default: ''
58+
cache: ''
59+
60+
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc.
61+
# It will generate hash from the target file for primary key. It works only If cache is specified.
62+
# Supports wildcards or a list of file names for caching multiple dependencies.
63+
# Default: ''
64+
cache-dependency-path: ''
65+
66+
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file,
67+
# and set up auth to read in from env.NODE_AUTH_TOKEN.
68+
# Default: ''
69+
registry-url: ''
70+
71+
# Optional scope for authenticating against scoped registries.
72+
# Will fall back to the repository owner when using the GitHub Packages registry (https://npm.pkg.github.com/).
73+
# Default: ''
74+
scope: ''
75+
76+
# Set always-auth option in npmrc file.
77+
# Default: ''
78+
always-auth: ''
79+
```
80+
<!-- end usage -->
81+
1982
**Basic:**
2083
2184
```yaml

0 commit comments

Comments
 (0)