Skip to content

Commit eeff01b

Browse files
committed
Merge branch 'main' into v-mpantic/add-latest-alias
2 parents e95e27a + 25184c4 commit eeff01b

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This action provides the following functionality for GitHub Actions users:
1111
- Registering problem matchers for error output
1212
- Configuring authentication for GPR or npm
1313

14-
# Usage
14+
## Usage
1515

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

@@ -22,7 +22,7 @@ steps:
2222
- uses: actions/checkout@v3
2323
- uses: actions/setup-node@v3
2424
with:
25-
node-version: '14'
25+
node-version: 14
2626
- run: npm install
2727
- run: npm test
2828
```
@@ -33,7 +33,7 @@ The action will first check the local cache for a semver match. If unable to fin
3333

3434
For information regarding locally cached versions of Node.js on GitHub hosted runners, check out [GitHub Actions Virtual Environments](https://github.com/actions/virtual-environments).
3535

36-
#### Supported version syntax
36+
### Supported version syntax
3737

3838
The `node-version` input supports the following syntax:
3939

@@ -49,7 +49,7 @@ The action defaults to search for the dependency file (`package-lock.json` or `y
4949

5050
**Note:** The action does not cache `node_modules`
5151

52-
See the examples of using cache for `yarn` / `pnpm` and `cache-dependency-path` input in the [Advanced usage](docs/advanced-usage.md#caching-packages-dependencies) guide.
52+
See the examples of using cache for `yarn`/`pnpm` and `cache-dependency-path` input in the [Advanced usage](docs/advanced-usage.md#caching-packages-data) guide.
5353

5454
**Caching npm dependencies:**
5555

@@ -58,7 +58,7 @@ steps:
5858
- uses: actions/checkout@v3
5959
- uses: actions/setup-node@v3
6060
with:
61-
node-version: '14'
61+
node-version: 14
6262
cache: 'npm'
6363
- run: npm install
6464
- run: npm test
@@ -71,22 +71,22 @@ steps:
7171
- uses: actions/checkout@v3
7272
- uses: actions/setup-node@v3
7373
with:
74-
node-version: '14'
74+
node-version: 14
7575
cache: 'npm'
7676
cache-dependency-path: subdir/package-lock.json
7777
- run: npm install
7878
- run: npm test
7979
```
8080

81-
## Matrix Testing:
81+
## Matrix Testing
8282

8383
```yaml
8484
jobs:
8585
build:
8686
runs-on: ubuntu-latest
8787
strategy:
8888
matrix:
89-
node: [ '12', '14', '16' ]
89+
node: [ 12, 14, 16 ]
9090
name: Node ${{ matrix.node }} sample
9191
steps:
9292
- uses: actions/checkout@v3
@@ -103,20 +103,20 @@ jobs:
103103
1. [Check latest version](docs/advanced-usage.md#check-latest-version)
104104
2. [Using a node version file](docs/advanced-usage.md#node-version-file)
105105
3. [Using different architectures](docs/advanced-usage.md#architecture)
106-
4. [Caching packages data](docs/advanced-usage.md#caching-packages-dependencies)
106+
4. [Caching packages data](docs/advanced-usage.md#caching-packages-data)
107107
5. [Using multiple operating systems and architectures](docs/advanced-usage.md#multiple-operating-systems-and-architectures)
108108
6. [Publishing to npmjs and GPR with npm](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-npm)
109109
7. [Publishing to npmjs and GPR with yarn](docs/advanced-usage.md#publish-to-npmjs-and-gpr-with-yarn)
110110
8. [Using private packages](docs/advanced-usage.md#use-private-packages)
111111

112-
# License
112+
## License
113113

114114
The scripts and documentation in this project are released under the [MIT License](LICENSE)
115115

116-
# Contributions
116+
## Contributions
117117

118-
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)
118+
Contributions are welcome! See [Contributor's Guide](docs/contributors.md)
119119

120120
## Code of Conduct
121121

122-
:wave: Be nice. See [our code of conduct](CODE_OF_CONDUCT.md)
122+
:wave: Be nice. See [our code of conduct](CODE_OF_CONDUCT.md)

action.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
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'
2+
description: 'Setup a Node.js environment by adding problem matchers and optionally downloading and adding it to the PATH.'
33
author: 'GitHub'
44
inputs:
55
always-auth:
6-
description: 'Set always-auth in npmrc'
6+
description: 'Set always-auth in npmrc.'
77
default: 'false'
88
node-version:
9-
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0'
9+
description: 'Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0.'
1010
node-version-file:
11-
description: 'File containing the version Spec of the version to use. Examples: .nvmrc, .node-version'
11+
description: 'File containing the version Spec of the version to use. Examples: .nvmrc, .node-version.'
1212
architecture:
1313
description: 'Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default.'
1414
check-latest:
15-
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec'
15+
description: 'Set this option if you want the action to check for the latest available version that satisfies the version spec.'
1616
default: false
1717
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'
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.'
1919
scope:
20-
description: 'Optional scope for authenticating against scoped registries'
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/).'
2121
token:
2222
description: Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user.
2323
default: ${{ github.token }}
2424
cache:
25-
description: 'Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm'
25+
description: 'Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm.'
2626
cache-dependency-path:
2727
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.'
2828
# TODO: add input to control forcing to pull from cloud or dist.
2929
# escape valve for someone having issues or needing the absolute latest which isn't cached yet
3030
outputs:
3131
cache-hit:
32-
description: 'A boolean value to indicate if a cache was hit'
32+
description: 'A boolean value to indicate if a cache was hit.'
3333
runs:
3434
using: 'node16'
3535
main: 'dist/setup/index.js'

0 commit comments

Comments
 (0)