Skip to content

Commit 068ca67

Browse files
authored
fix: remove unused property & improve ci action (#623)
Signed-off-by: Bob Du <i@bobdu.cc>
1 parent 8f5776f commit 068ca67

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

.github/workflows/build_docker.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: build_docker
1+
name: Build and push docker image
22

33
on:
44
push:
@@ -56,8 +56,6 @@ jobs:
5656
labels: ${{ steps.meta.outputs.labels }}
5757
platforms: linux/amd64,linux/arm64
5858
tags: |
59-
${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-web:${{ github.ref_name }}
60-
${{ secrets.DOCKERHUB_USERNAME }}/chatgpt-web:latest
6159
${{ vars.DOCKERHUB_NAMESPACE }}/chatgpt-web:${{ github.ref_name }}
6260
${{ vars.DOCKERHUB_NAMESPACE }}/chatgpt-web:latest
6361
build-args: |

.github/workflows/ci.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ on:
1111

1212
jobs:
1313
lint:
14+
name: Lint
1415
runs-on: ubuntu-latest
1516
steps:
1617
- uses: actions/checkout@v4
@@ -20,11 +21,17 @@ jobs:
2021
- uses: pnpm/action-setup@v4
2122
with:
2223
version: 8
23-
- run: pnpm install
24+
- name: Install dependencies
25+
run: pnpm install
2426
- name: Lint
2527
run: pnpm lint
28+
- name: Install service dependencies
29+
run: cd service && pnpm install
30+
- name: Lint service
31+
run: cd service && pnpm lint
2632

2733
typecheck:
34+
name: Typecheck
2835
runs-on: ubuntu-latest
2936
steps:
3037
- uses: actions/checkout@v4
@@ -34,6 +41,11 @@ jobs:
3441
- uses: pnpm/action-setup@v4
3542
with:
3643
version: 8
37-
- run: pnpm install
44+
- name: Install dependencies
45+
run: pnpm install
3846
- name: Typecheck
3947
run: pnpm type-check
48+
- name: Install service dependencies
49+
run: cd service && pnpm install
50+
- name: Typecheck service
51+
run: cd service && pnpm type-check

service/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"dev": "tsx watch --inspect ./src/index.ts",
2121
"prod": "node --import tsx/esm ./build/index.js",
2222
"prod-node18": "node --loader tsx/esm ./build/index.js",
23+
"type-check": "tsc --noEmit",
2324
"build": "pnpm clean && tsc && pnpm copy",
2425
"copy": "copyfiles -u 1 src/utils/templates/* build",
2526
"clean": "rimraf build",

service/src/routes/chat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ router.post('/chat-process', [auth, limiter], async (req, res) => {
241241
try {
242242
// If use the fixed fakeuserid(some probability of duplicated with real ones), redefine user which is send to chatReplyProcess
243243
if (userId === '6406d8c50aedd633885fa16f') {
244-
user = { _id: userId, roles: [UserRole.User], useAmount: 999, advanced: { maxContextCount: 999 }, limit_switch: false } as UserInfo
244+
user = { _id: userId, roles: [UserRole.User], useAmount: 999, limit_switch: false } as UserInfo
245245
}
246246
else {
247247
// If global usage count limit is enabled, check can use amount before process chat.

0 commit comments

Comments
 (0)