feat: update

This commit is contained in:
yanghao05
2025-04-23 10:20:28 +08:00
parent 837941b7ec
commit b1b6b2c42e
11 changed files with 29 additions and 10 deletions

View File

@@ -14,19 +14,30 @@ jobs:
with:
node-version: "20"
- name: Install dependencies and build frontend
- name: build frontend/Admin
run: |
cd frontend
cd frontend/admin
npm config set registry https://npm.hub.ipao.vip
npm install
npm run build
rm dist/vite.svg
cp src/assets/* dist/
- name: build frontend/Wechat
run: |
cd frontend/wechat
npm config set registry https://npm.hub.ipao.vip
npm install
npm run build
rm dist/vite.svg
cp src/assets/* dist/
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22"
go-version: "1.24"
- name: Build Go application
- name: Build Go App
run: |
cd backend
mkdir -p build
@@ -35,8 +46,10 @@ jobs:
go env -w GONOSUMDB='git.ipao.vip'
go mod tidy
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o build/app .
cp -ap ../frontend/admin/dist build/dist/admin
cp -ap ../frontend/wechat/dist build/dist/wechat
- name: Build final Docker image
- name: Build Docker image
run: |
docker login -u ${{ secrets.DOCKER_AF_USERNAME }} -p ${{ secrets.DOCKER_AF_PASSWORD }} docker-af.hub.ipao.vip
docker build --push -t docker-af.hub.ipao.vip/rogeecn/test:latest .
docker build --push -t docker-af.hub.ipao.vip/rogeecn/quyun:latest .