ci: 镜像化skia-canvas二进制下载

This commit is contained in:
sunlei 2026-06-24 17:00:53 +08:00
parent d061ac5b22
commit b5edfe9509
3 changed files with 7 additions and 0 deletions

View File

@ -23,6 +23,8 @@ ENV FFLOGS_GRAPHQL_URL=https://cn.fflogs.com/api/v2/client
ENV FFLOGS_TOKEN_URL=https://cn.fflogs.com/oauth/token ENV FFLOGS_TOKEN_URL=https://cn.fflogs.com/oauth/token
ENV FFLOGS_DEFAULT_SERVER_REGION=CN ENV FFLOGS_DEFAULT_SERVER_REGION=CN
ENV FFLOGS_REQUEST_TIMEOUT_MS=10000 ENV FFLOGS_REQUEST_TIMEOUT_MS=10000
# skia-canvas uses binary.module_name=index, so node-pre-gyp reads this mirror key.
ENV npm_config_index_binary_host_mirror=https://registry.npmmirror.com/-/binary/skia-canvas/
COPY package.json pnpm-lock.yaml ./ COPY package.json pnpm-lock.yaml ./

View File

@ -23,6 +23,8 @@ ENV FFLOGS_GRAPHQL_URL=https://cn.fflogs.com/api/v2/client
ENV FFLOGS_TOKEN_URL=https://cn.fflogs.com/oauth/token ENV FFLOGS_TOKEN_URL=https://cn.fflogs.com/oauth/token
ENV FFLOGS_DEFAULT_SERVER_REGION=CN ENV FFLOGS_DEFAULT_SERVER_REGION=CN
ENV FFLOGS_REQUEST_TIMEOUT_MS=10000 ENV FFLOGS_REQUEST_TIMEOUT_MS=10000
# skia-canvas uses binary.module_name=index, so node-pre-gyp reads this mirror key.
ENV npm_config_index_binary_host_mirror=https://registry.npmmirror.com/-/binary/skia-canvas/
COPY package.json pnpm-lock.yaml ./ COPY package.json pnpm-lock.yaml ./

View File

@ -43,6 +43,9 @@ describe('NapCat WebUI Gateway deployment configuration', () => {
expect(dockerfile).toContain('mirrors.aliyun.com/debian'); expect(dockerfile).toContain('mirrors.aliyun.com/debian');
expect(dockerfile).toContain('mirrors.aliyun.com/debian-security'); expect(dockerfile).toContain('mirrors.aliyun.com/debian-security');
expect(dockerfile).toContain('Acquire::Retries=5'); expect(dockerfile).toContain('Acquire::Retries=5');
expect(dockerfile).toContain(
'npm_config_index_binary_host_mirror=https://registry.npmmirror.com/-/binary/skia-canvas/',
);
} }
}); });