From cd83f2ce5d48eaa235d9af959bd24b4c616b5fd3 Mon Sep 17 00:00:00 2001 From: h7ml Date: Tue, 16 Sep 2025 23:50:11 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E7=AE=80=E5=8C=96=20CI=20=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81=E5=B9=B6=E7=A7=BB=E9=99=A4=E5=AE=89=E5=85=A8?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除了 ESLint 步骤中的 --cache 参数 - 删除了安全扫描 job,包括 npm audit 和 CodeQL 分析 --- .github/workflows/ci.yml | 38 +------------------------------------- 1 file changed, 1 insertion(+), 37 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 034a354..89c0e6f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -41,7 +41,7 @@ jobs: ${{ runner.os }}-eslint- - name: 运行 ESLint - run: npm run lint -- --cache + run: npm run lint - name: 缓存 TypeScript uses: actions/cache@v3 @@ -102,39 +102,3 @@ jobs: with: name: build-files path: .next/ - - security-scan: - name: 安全扫描 - runs-on: ubuntu-latest - - steps: - - name: 检出代码 - uses: actions/checkout@v4 - - - name: 设置 Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - cache: 'npm' - - - name: 缓存 node_modules - uses: actions/cache@v3 - with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- - - - name: 安装依赖 - run: npm ci - - - name: 运行安全审计 - run: npm audit --audit-level=moderate - - - name: 运行 CodeQL 分析 - uses: github/codeql-action/init@v3 - with: - languages: javascript - - - name: 执行 CodeQL 分析 - uses: github/codeql-action/analyze@v3 \ No newline at end of file