mirror of
https://github.com/digitalocean/nginxconfig.io.git
synced 2025-08-21 18:05:44 +08:00
Add step to resolve package.json engines.npm version specifically
This commit is contained in:
10
.github/workflows/do-spaces-workflow.yml
vendored
10
.github/workflows/do-spaces-workflow.yml
vendored
@@ -15,6 +15,16 @@ jobs:
|
|||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
|
- name: Setup NPM
|
||||||
|
run: |
|
||||||
|
NPM_VERSION=$(jq -r .engines.npm package.json)
|
||||||
|
NPM_VERSION=${NPM_VERSION/\^/}
|
||||||
|
if [ "$(npm --version)" != "$NPM_VERSION" ]; then
|
||||||
|
npm install -g npm@$NPM_VERSION && npm --version
|
||||||
|
else
|
||||||
|
echo "NPM version is same as package.json engines.npm"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
|
10
.github/workflows/gh-pages-workflow.yml
vendored
10
.github/workflows/gh-pages-workflow.yml
vendored
@@ -18,6 +18,16 @@ jobs:
|
|||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
|
- name: Setup NPM
|
||||||
|
run: |
|
||||||
|
NPM_VERSION=$(jq -r .engines.npm package.json)
|
||||||
|
NPM_VERSION=${NPM_VERSION/\^/}
|
||||||
|
if [ "$(npm --version)" != "$NPM_VERSION" ]; then
|
||||||
|
npm install -g npm@$NPM_VERSION && npm --version
|
||||||
|
else
|
||||||
|
echo "NPM version is same as package.json engines.npm"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
|
30
.github/workflows/test-workflow.yml
vendored
30
.github/workflows/test-workflow.yml
vendored
@@ -15,6 +15,16 @@ jobs:
|
|||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
|
- name: Setup NPM
|
||||||
|
run: |
|
||||||
|
NPM_VERSION=$(jq -r .engines.npm package.json)
|
||||||
|
NPM_VERSION=${NPM_VERSION/\^/}
|
||||||
|
if [ "$(npm --version)" != "$NPM_VERSION" ]; then
|
||||||
|
npm install -g npm@$NPM_VERSION && npm --version
|
||||||
|
else
|
||||||
|
echo "NPM version is same as package.json engines.npm"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
@@ -33,6 +43,16 @@ jobs:
|
|||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
|
- name: Setup NPM
|
||||||
|
run: |
|
||||||
|
NPM_VERSION=$(jq -r .engines.npm package.json)
|
||||||
|
NPM_VERSION=${NPM_VERSION/\^/}
|
||||||
|
if [ "$(npm --version)" != "$NPM_VERSION" ]; then
|
||||||
|
npm install -g npm@$NPM_VERSION && npm --version
|
||||||
|
else
|
||||||
|
echo "NPM version is same as package.json engines.npm"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
@@ -51,6 +71,16 @@ jobs:
|
|||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
cache: npm
|
cache: npm
|
||||||
|
|
||||||
|
- name: Setup NPM
|
||||||
|
run: |
|
||||||
|
NPM_VERSION=$(jq -r .engines.npm package.json)
|
||||||
|
NPM_VERSION=${NPM_VERSION/\^/}
|
||||||
|
if [ "$(npm --version)" != "$NPM_VERSION" ]; then
|
||||||
|
npm install -g npm@$NPM_VERSION && npm --version
|
||||||
|
else
|
||||||
|
echo "NPM version is same as package.json engines.npm"
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user