Files
chat-one-web/.gitea/workflows/ci.yml
alboped 080881bda1
All checks were successful
CI / build (push) Successful in 2m25s
ci: 优化此配置;
2026-04-10 01:14:08 +08:00

54 lines
1.4 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Gitea Actions需开启 Actions 并注册 act_runner。
# Runner 建议GITEA_RUNNER_LABELS=ubuntu-latest:docker://node:22-bookwormJob 内自带 Node避免 setup-node 重复下载)
# 需挂载 /var/run/docker.sock。
#
# 说明NODEJS_ORG_MIRROR 在 act_runner 中常被忽略/不生效;用镜像自带 Node 即可绕过。
name: CI
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# 使用 Job 镜像node:22-bookworm自带的 Node不再使用 actions/setup-node避免重复下载 Node
- name: Setup Yarn
run: |
corepack enable
corepack prepare yarn@1.22.22 --activate
echo "node -v: $(node -v); yarn -v: $(yarn -v)"
echo "yarn config get registry: $(yarn config get registry)"
- name: Cache Yarn
uses: actions/cache@v4
with:
path: ~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install
run: yarn install --frozen-lockfile
- name: Prettier check
run: yarn format:check
- name: ESLint
run: yarn lint
- name: Build
run: yarn build