3
0
Fork 0
mirror of https://gitea.com/actions/setup-node.git synced 2024-11-21 17:49:33 +01:00

Update actions/checkout for documentation and yaml (#876)

This commit is contained in:
Dmitry Shibanov 2023-10-23 16:22:01 +02:00 committed by GitHub
parent 23755b521f
commit 8f152de45c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 42 deletions

View file

@ -21,7 +21,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12, 14, 16] node-version: [12, 14, 16]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Clean global cache - name: Clean global cache
run: npm cache clean --force run: npm cache clean --force
- name: Setup Node - name: Setup Node
@ -44,7 +44,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12, 14, 16] node-version: [12, 14, 16]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v2 uses: pnpm/action-setup@v2
with: with:
@ -77,7 +77,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [14, 16] node-version: [14, 16]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Yarn version - name: Yarn version
run: yarn --version run: yarn --version
- name: Generate yarn file - name: Generate yarn file
@ -109,7 +109,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12, 14, 16] node-version: [12, 14, 16]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Update yarn - name: Update yarn
run: yarn set version 3.6.4 run: yarn set version 3.6.4
- name: Yarn version - name: Yarn version
@ -143,7 +143,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: prepare sub-projects - name: prepare sub-projects
run: __tests__/prepare-yarn-subprojects.sh yarn1 run: __tests__/prepare-yarn-subprojects.sh yarn1
@ -170,7 +170,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: prepare sub-projects - name: prepare sub-projects
run: __tests__/prepare-yarn-subprojects.sh keepcache keepcache run: __tests__/prepare-yarn-subprojects.sh keepcache keepcache
@ -197,7 +197,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: prepare sub-projects - name: prepare sub-projects
run: __tests__/prepare-yarn-subprojects.sh global run: __tests__/prepare-yarn-subprojects.sh global
@ -224,7 +224,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: prepare sub-projects - name: prepare sub-projects
run: /bin/bash __tests__/prepare-yarn-subprojects.sh keepcache run: /bin/bash __tests__/prepare-yarn-subprojects.sh keepcache

View file

@ -25,7 +25,7 @@ jobs:
env: env:
https_proxy: http://squid-proxy:3128 https_proxy: http://squid-proxy:3128
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Clear tool cache - name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/* run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup node 14 - name: Setup node 14
@ -41,7 +41,7 @@ jobs:
https_proxy: http://no-such-proxy:3128 https_proxy: http://no-such-proxy:3128
no_proxy: api.github.com,github.com,nodejs.org,registry.npmjs.org,*.s3.amazonaws.com,s3.amazonaws.com no_proxy: api.github.com,github.com,nodejs.org,registry.npmjs.org,*.s3.amazonaws.com,s3.amazonaws.com
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Clear tool cache - name: Clear tool cache
run: rm -rf $RUNNER_TOOL_CACHE/* run: rm -rf $RUNNER_TOOL_CACHE/*
- name: Setup node 11 - name: Setup node 11

View file

@ -20,7 +20,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 12, 14] node-version: [10, 12, 14]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node - name: Setup Node
uses: ./ uses: ./
with: with:
@ -37,7 +37,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [lts/dubnium, lts/erbium, lts/fermium, lts/*, lts/-1] node-version: [lts/dubnium, lts/erbium, lts/fermium, lts/*, lts/-1]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node - name: Setup Node
uses: ./ uses: ./
with: with:
@ -64,7 +64,7 @@ jobs:
'20.0.0-v8-canary20221101e50e45c9f8' '20.0.0-v8-canary20221101e50e45c9f8'
] ]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node - name: Setup Node
uses: ./ uses: ./
with: with:
@ -85,7 +85,7 @@ jobs:
node-version: node-version:
[16.0.0-nightly20210420a0261d231c, 17-nightly, 18.0.0-nightly] [16.0.0-nightly20210420a0261d231c, 17-nightly, 18.0.0-nightly]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node - name: Setup Node
uses: ./ uses: ./
with: with:
@ -105,7 +105,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [16.0.0-rc.1, 18.0.0-rc.2, 19.0.0-rc.0] node-version: [16.0.0-rc.1, 18.0.0-rc.2, 19.0.0-rc.0]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node - name: Setup Node
uses: ./ uses: ./
with: with:
@ -125,7 +125,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10.15, 12.16.0, 14.2.0, 16.3.0] node-version: [10.15, 12.16.0, 14.2.0, 16.3.0]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node - name: Setup Node
uses: ./ uses: ./
with: with:
@ -142,7 +142,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 12, 14] node-version: [10, 12, 14]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node and check latest - name: Setup Node and check latest
uses: ./ uses: ./
with: with:
@ -161,7 +161,7 @@ jobs:
node-version-file: node-version-file:
[.nvmrc, .tool-versions, .tool-versions-node, package.json] [.nvmrc, .tool-versions, .tool-versions-node, package.json]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Remove volta from package.json - name: Remove volta from package.json
shell: bash shell: bash
run: cat <<< "$(jq 'del(.volta)' ./__tests__/data/package.json)" > ./__tests__/data/package.json run: cat <<< "$(jq 'del(.volta)' ./__tests__/data/package.json)" > ./__tests__/data/package.json
@ -179,7 +179,7 @@ jobs:
matrix: matrix:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node from node version file - name: Setup node from node version file
uses: ./ uses: ./
with: with:
@ -195,7 +195,7 @@ jobs:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [11, 13] node-version: [11, 13]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node from dist - name: Setup Node from dist
uses: ./ uses: ./
with: with:
@ -211,7 +211,7 @@ jobs:
matrix: matrix:
os: [ubuntu-latest, windows-latest, macos-latest] os: [ubuntu-latest, windows-latest, macos-latest]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
# test old versions which didn't have npm and layout different # test old versions which didn't have npm and layout different
- name: Setup node 0.12.18 from dist - name: Setup node 0.12.18 from dist
uses: ./ uses: ./
@ -224,7 +224,7 @@ jobs:
arch: arch:
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node 14 x86 from dist - name: Setup node 14 x86 from dist
uses: ./ uses: ./
with: with:
@ -248,7 +248,7 @@ jobs:
echo "LATEST_NODE_VERSION=$latestNodeVersion" >> $GITHUB_OUTPUT echo "LATEST_NODE_VERSION=$latestNodeVersion" >> $GITHUB_OUTPUT
id: version id: version
shell: bash shell: bash
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup Node - name: Setup Node
uses: ./ uses: ./
with: with:

View file

@ -45,7 +45,7 @@ If `check-latest` is set to `true`, the action first checks if the cached versio
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '16' node-version: '16'
@ -63,7 +63,7 @@ See [supported version syntax](https://github.com/actions/setup-node#supported-v
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version-file: '.nvmrc' node-version-file: '.nvmrc'
@ -95,7 +95,7 @@ jobs:
runs-on: windows-latest runs-on: windows-latest
name: Node sample name: Node sample
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '14'
@ -116,7 +116,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Node sample name: Node sample
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '20.0.0-v8-canary' # it will install the latest v8 canary release for node 20.0.0 node-version: '20.0.0-v8-canary' # it will install the latest v8 canary release for node 20.0.0
@ -131,7 +131,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Node sample name: Node sample
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '20-v8-canary' # it will install the latest v8 canary release for node 20 node-version: '20-v8-canary' # it will install the latest v8 canary release for node 20
@ -147,7 +147,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Node sample name: Node sample
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: 'v20.1.1-v8-canary20221103f7e2421e91' node-version: 'v20.1.1-v8-canary20221103f7e2421e91'
@ -167,7 +167,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Node sample name: Node sample
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '16-nightly' # it will install the latest nightly release for node 16 node-version: '16-nightly' # it will install the latest nightly release for node 16
@ -183,7 +183,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Node sample name: Node sample
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '16.0.0-nightly' # it will install the latest nightly release for node 16.0.0 node-version: '16.0.0-nightly' # it will install the latest nightly release for node 16.0.0
@ -199,7 +199,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Node sample name: Node sample
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '16.0.0-nightly20210420a0261d231c' node-version: '16.0.0-nightly20210420a0261d231c'
@ -217,7 +217,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Node sample name: Node sample
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '16.0.0-rc.1' node-version: '16.0.0-rc.1'
@ -234,7 +234,7 @@ The action follows [actions/cache](https://github.com/actions/cache/blob/main/ex
Yarn caching handles both yarn versions: 1 or 2. Yarn caching handles both yarn versions: 1 or 2.
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '14'
@ -253,7 +253,7 @@ steps:
# NOTE: pnpm caching support requires pnpm version >= 6.10.0 # NOTE: pnpm caching support requires pnpm version >= 6.10.0
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: pnpm/action-setup@v2 - uses: pnpm/action-setup@v2
with: with:
version: 6.32.9 version: 6.32.9
@ -272,7 +272,7 @@ steps:
**Using wildcard patterns to cache dependencies** **Using wildcard patterns to cache dependencies**
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '14'
@ -285,7 +285,7 @@ steps:
**Using a list of file paths to cache dependencies** **Using a list of file paths to cache dependencies**
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '14' node-version: '14'
@ -322,7 +322,7 @@ jobs:
architecture: x86 architecture: x86
name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }} name: Node ${{ matrix.node_version }} - ${{ matrix.architecture }} on ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
@ -335,7 +335,7 @@ jobs:
## Publish to npmjs and GPR with npm ## Publish to npmjs and GPR with npm
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '14.x' node-version: '14.x'
@ -355,7 +355,7 @@ steps:
## Publish to npmjs and GPR with yarn ## Publish to npmjs and GPR with yarn
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '14.x' node-version: '14.x'
@ -375,7 +375,7 @@ steps:
## Use private packages ## Use private packages
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '14.x' node-version: '14.x'
@ -395,7 +395,7 @@ Below you can find a sample "Setup .yarnrc.yml" step, that is going to allow you
```yaml ```yaml
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- uses: actions/setup-node@v3 - uses: actions/setup-node@v3
with: with:
node-version: '14.x' node-version: '14.x'