Skip to content

Commit

Permalink
perf: speed up image building in github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Jan 24, 2024
1 parent 18deb10 commit 5fc774f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
/dist
.DS_Store
/src/sdk.ts
.npmrc
/.history
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tenx-ui:registry=http://dev-npm.tenxcloud.net/
always-auth=true
strict-peer-dependencies=false
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ WORKDIR /tmp/bff-sdk-generator

COPY . /tmp/bff-sdk-generator/

RUN npm i pnpm @antfu/ni zx cnpm -g --registry=https://registry.npmmirror.com
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc ni --ignore-scripts --registry=http://dev-npm.tenxcloud.net
# Enable this line to use npm mirror in China
# RUN npm set registry https://registry.npmmirror.com/

RUN npm i pnpm @antfu/ni zx cnpm -g
RUN --mount=type=secret,id=npmrc,target=/root/.npmrc ni --ignore-scripts

RUN chmod +x ./publish.sh
ENTRYPOINT ["sh", "publish.sh"]

0 comments on commit 5fc774f

Please sign in to comment.