mirror of
https://github.com/actions/setup-node.git
synced 2026-06-14 14:13:52 +08:00
Compare commits
3 Commits
v6.0.0
...
3dbb90426e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3dbb90426e | ||
|
|
dda4788290 | ||
|
|
a5a46b4a0e |
2
dist/setup/index.js
vendored
2
dist/setup/index.js
vendored
@@ -99329,6 +99329,8 @@ class BaseDistribution {
|
|||||||
switch (arch) {
|
switch (arch) {
|
||||||
case 'arm':
|
case 'arm':
|
||||||
return 'armv7l';
|
return 'armv7l';
|
||||||
|
case 'ppc64':
|
||||||
|
return 'ppc64le';
|
||||||
default:
|
default:
|
||||||
return arch;
|
return arch;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -300,6 +300,35 @@ steps:
|
|||||||
- run: npm test
|
- run: npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Restore-Only Cache**
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
## In some workflows, you may want to restore a cache without saving it. This can help reduce cache writes and storage usage in workflows that only need to read from cache
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v5
|
||||||
|
# Restore Node.js modules cache (restore-only)
|
||||||
|
- name: Restore Node modules cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
id: cache-node-modules
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
|
# Setup Node.js
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version: '24'
|
||||||
|
# Install dependencies
|
||||||
|
- run: npm install
|
||||||
|
```
|
||||||
|
|
||||||
|
> For more details related to cache scenarios, please refer [Node – npm](https://github.com/actions/cache/blob/main/examples.md#node---npm).
|
||||||
|
|
||||||
## Multiple Operating Systems and Architectures
|
## Multiple Operating Systems and Architectures
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
|
|||||||
@@ -338,6 +338,8 @@ export default abstract class BaseDistribution {
|
|||||||
switch (arch) {
|
switch (arch) {
|
||||||
case 'arm':
|
case 'arm':
|
||||||
return 'armv7l';
|
return 'armv7l';
|
||||||
|
case 'ppc64':
|
||||||
|
return 'ppc64le';
|
||||||
default:
|
default:
|
||||||
return arch;
|
return arch;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user