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