[Chore] Use Tabao NPM Mirror in CI
* Updated `.npmrc`: add Tabao NPM Mirror * Updated `Makefile`: display npm config list to validate NODE_MIRROR * Updated `Dockerfile.rootless`: Removed trivial NPM Mirror settings, and added reference to `/.npmrc`::`registry`
This commit is contained in:
1
.npmrc
1
.npmrc
@@ -4,3 +4,4 @@ update-notifier=false
|
||||
package-lock=true
|
||||
save-exact=true
|
||||
lockfile-version=3
|
||||
registry=https://registry.npmmirror.com/
|
||||
|
||||
@@ -9,11 +9,11 @@ ARG RUNTIME_CONTAINER="gitea-runtime-container:v1.0"
|
||||
# stage1: Building Stage
|
||||
FROM ${DOCKER_REGISTRY_ADDRESS}/${DOCKER_REGISTRY_USERNAME}/${DEV_CONTAINER} AS build-env
|
||||
|
||||
# 设置 Go 代理
|
||||
ARG GOPROXY="https://goproxy.cn"
|
||||
ARG NODEJS_PROXY="http://mirrors.cloud.tencent.com/nodejs-release/"
|
||||
|
||||
ENV GOPROXY=${GOPROXY:-direct}
|
||||
ENV NODE_MIRROR=${NODEJS_PROXY}
|
||||
# 注:对于 NPM 代理/镜像, 参考仓库 `/.npmrc` 文件下的 `registry` 变量,推荐使用淘宝镜像,即 `registry=https://registry.npmmirror.com/`
|
||||
|
||||
|
||||
ARG GITEA_VERSION
|
||||
# TODO: 适配 https://devstar.cn
|
||||
|
||||
1
Makefile
1
Makefile
@@ -874,6 +874,7 @@ deps-tools:
|
||||
$(GO) install $(GOPLS_PACKAGE)
|
||||
|
||||
node_modules: package-lock.json
|
||||
npm config list
|
||||
npm install --no-save
|
||||
@touch node_modules
|
||||
|
||||
|
||||
Reference in New Issue
Block a user