File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Frontend CI/CD
33on :
44 push :
55 tags :
6- - " v[0-9]+.[0-9]+.[0-9]+*"
6+ - ' v[0-9]+.[0-9]+.[0-9]+*'
77 paths :
88 - ' ui/**'
99 - ' .github/workflows/frontend-ci-cd.yml'
@@ -29,12 +29,12 @@ jobs:
2929 - name : Set up Node.js
3030 uses : actions/setup-node@v4
3131 with :
32- node-version : ' 20'
32+ node-version : ' 20.19.0 '
3333
3434 - name : Set up pnpm
3535 uses : pnpm/action-setup@v2
3636 with :
37- version : 8
37+ version : 10.12.1
3838
3939 - name : Get version
4040 id : get_version
@@ -130,4 +130,4 @@ jobs:
130130 ${{ env.REGISTRY }}/frontend:${{ needs.build.outputs.version }}
131131 ${{ env.REGISTRY }}/frontend:latest
132132 cache-from : type=gha
133- cache-to : type=gha,mode=max
133+ cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 1+ PLATFORM =linux/amd64
2+ TAG =main
3+ REGISTRY =monkeycode
4+
5+
6+ # 构建前端代码
7+ build :
8+ pnpm run build
9+
10+ # 构建并加载到本地Docker
11+ image : build
12+ docker buildx build \
13+ -f .Dockerfile \
14+ --platform ${PLATFORM} \
15+ --tag ${REGISTRY} /frontend:${TAG} \
16+ --load \
17+ .
18+
19+ save : image
20+ docker save -o /tmp/monkeycode_frontend.tar monkeycode/frontend:main
21+
You can’t perform that action at this time.
0 commit comments