Files
chat-one-service/.gitea/workflows/ci.yml
alboped 3076b7ec54
Some checks failed
CI / ci (push) Failing after 2s
chore: 重构 CI/CD 与 Docker 发布流程
将部署链路调整为 CI 构建推送镜像、服务器拉取镜像运行,并拆分/复用 Gitea workflow 与公共准备脚本;同时统一 APP_NAME 与端口变量配置,补充 Docker 与 ESLint 相关配置文件以提升可维护性。

Made-with: Cursor
2026-04-28 01:44:37 +08:00

37 lines
897 B
YAML

name: CI
on:
push:
branches: ["main"]
pull_request:
jobs:
# workflow_call 调用示例(先保留注释,不启用):
# ci:
# uses: ./.gitea/workflows/reusable-ci.yml
# with:
# node_major: "22"
# yarn_version: "stable"
# run_lint: true
# run_tsc: true
ci:
runs-on: ubuntu-latest
env:
NODE_MAJOR: "22"
YARN_VERSION: "stable"
steps:
- name: Prepare workspace (checkout + node/yarn)
run: |
set -euo pipefail
chmod +x .gitea/scripts/prepare-workspace.sh
./.gitea/scripts/prepare-workspace.sh \
"${{ github.server_url }}/${{ github.repository }}.git" \
"${{ github.sha }}"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: TypeScript check
run: yarn tsc --noEmit