chore: configure npm proxy in ci
This commit is contained in:
@@ -31,15 +31,16 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-node-
|
${{ runner.os }}-node-
|
||||||
|
|
||||||
# - name: Configure npm registry
|
- name: Configure npm proxy
|
||||||
# run: |
|
run: |
|
||||||
# npm config set registry https://registry.npmmirror.com
|
if [ -n "$HTTP_PROXY" ]; then npm config set proxy "$HTTP_PROXY"; fi
|
||||||
# npm config set fetch-retries 5
|
if [ -n "$http_proxy" ]; then npm config set proxy "$http_proxy"; fi
|
||||||
# npm config set fetch-retry-mintimeout 20000
|
if [ -n "$HTTPS_PROXY" ]; then npm config set https-proxy "$HTTPS_PROXY"; fi
|
||||||
# npm config set fetch-retry-maxtimeout 120000
|
if [ -n "$https_proxy" ]; then npm config set https-proxy "$https_proxy"; fi
|
||||||
# npm config set audit false
|
|
||||||
# if [ -n "$HTTP_PROXY" ]; then npm config set proxy "$HTTP_PROXY"; fi
|
- name: Show proxy status
|
||||||
# if [ -n "$HTTPS_PROXY" ]; then npm config set https-proxy "$HTTPS_PROXY"; fi
|
run: |
|
||||||
|
if [ -n "$HTTP_PROXY" ] || [ -n "$http_proxy" ] || [ -n "$HTTPS_PROXY" ] || [ -n "$https_proxy" ]; then echo "proxy=on"; else echo "proxy=off"; fi
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|||||||
Reference in New Issue
Block a user