docs: Update code samples to v3

Simple change to update code samples from v2 to v3 to reflect the latest version.
This commit is contained in:
Mauricio Lauffer 2022-03-03 12:06:59 +11:00 committed by GitHub
parent 9ced9a43a2
commit b70cc10d98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,10 +18,10 @@ See [action.yml](action.yml)
**Basic:** **Basic:**
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '16'
- run: npm install - run: npm install
- run: npm test - run: npm test
``` ```
@ -50,10 +50,10 @@ See the examples of using cache for `yarn` / `pnpm` and `cache-dependency-path`
**Caching npm dependencies:** **Caching npm dependencies:**
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '16'
cache: 'npm' cache: 'npm'
- run: npm install - run: npm install
- run: npm test - run: npm test
@ -62,10 +62,10 @@ steps:
**Caching npm dependencies in monorepos:** **Caching npm dependencies in monorepos:**
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: actions/setup-node@v2 - uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '16'
cache: 'npm' cache: 'npm'
cache-dependency-path: subdir/package-lock.json cache-dependency-path: subdir/package-lock.json
- run: npm install - run: npm install
@ -82,9 +82,9 @@ jobs:
node: [ '12', '14', '16' ] node: [ '12', '14', '16' ]
name: Node ${{ matrix.node }} sample name: Node ${{ matrix.node }} sample
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- run: npm install - run: npm install