fix: 移除 container 字段和 paths 过滤器,恢复 setup-go/setup-node 以兼容 Gitea Actions
This commit is contained in:
@@ -3,25 +3,26 @@ name: Backend CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths: [backend/**]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths: [backend/**]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
runs-on: aliyun
|
runs-on: aliyun
|
||||||
container: golang:1.23-bookworm
|
|
||||||
env:
|
|
||||||
GOPROXY: https://goproxy.cn,direct
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: backend
|
working-directory: backend
|
||||||
steps:
|
steps:
|
||||||
- uses: http://8.161.227.145:3000/huanghaosheng/checkout@releases/v4
|
- uses: http://8.161.227.145:3000/huanghaosheng/checkout@releases/v4
|
||||||
|
|
||||||
|
- uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: "1.23"
|
||||||
|
|
||||||
- name: Download dependencies
|
- name: Download dependencies
|
||||||
run: go mod download
|
run: go mod download
|
||||||
|
env:
|
||||||
|
GOPROXY: https://goproxy.cn,direct
|
||||||
|
|
||||||
- name: Vet
|
- name: Vet
|
||||||
run: go vet ./...
|
run: go vet ./...
|
||||||
|
|||||||
@@ -3,23 +3,26 @@ name: Frontend CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths: [frontend/**]
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
paths: [frontend/**]
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
runs-on: aliyun
|
runs-on: aliyun
|
||||||
container: node:22-bookworm
|
|
||||||
env:
|
|
||||||
npm_config_registry: https://registry.npmmirror.com
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: frontend
|
working-directory: frontend
|
||||||
steps:
|
steps:
|
||||||
- uses: http://8.161.227.145:3000/huanghaosheng/checkout@releases/v4
|
- uses: http://8.161.227.145:3000/huanghaosheng/checkout@releases/v4
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: frontend/package-lock.json
|
||||||
|
env:
|
||||||
|
npm_config_registry: https://registry.npmmirror.com
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user