labels: ci: domain-linux-native platform: linux/amd64 clone: - name: git image: plugin-git settings: lfs: false # [CI] 构建要算开发版本号(ci/version.sh:自最近 tag 的提交数),要拿到 tag tags: true when: - event: pull_request - event: push branch: main # 和 verify 并行:前端构建不依赖后端测试,两个同时跑 steps: - name: web-build image: bash environment: NPM_CONFIG_CACHE: /home/justme/.npm commands: # node_modules 按锁文件哈希缓存,展示端和管理端并行构建,再检查 CSS,见 ci/web-build.sh # main 上带 [CI] 的提交:先写入开发版本号,构建完把产物交给同一条流水线的开发镜像(ci/shared-web.sh),前端只构建一次 - | if [ "$CI_PIPELINE_EVENT" = push ] && printf '%s' "$CI_COMMIT_MESSAGE" | grep -qF '[CI]'; then export WEB_PUBLISH_SHARED=1 bash ci/version.sh apply fi python3 ci/guard-step.py web-build 900 bash ci/web-build.sh