From 340b6cae90eb06cdc17233d56ef67fc2f321c915 Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Wed, 15 Apr 2026 12:51:59 +0800 Subject: [PATCH] =?UTF-8?q?chore(ci):=20=E6=9B=B4=E6=96=B0GitHub=20Actions?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=B5=81=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除push触发器,仅保留pull request触发CI构建测试 - 添加CodeQL静态代码分析工作流,支持安全漏洞检测 - 配置每日凌晨2点定时执行CodeQL分析 - 设置.NET 8.0.x运行时环境支持 - 启用C#语言自动构建模式进行代码扫描 --- .github/workflows/ci.yml | 4 +--- .github/workflows/codeql.yml | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14606c84..1bb32d49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,8 @@ # CI/CD工作流配置:构建和测试.NET项目 -# 该工作流在推送到任意分支或创建面向任意分支的 pull request 时触发 +# 该工作流仅在创建或更新面向任意分支的 pull request 时触发 name: CI - Build & Test on: - push: - branches: [ '**' ] pull_request: branches: [ '**' ] diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1bbc0abd..0a068113 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -4,12 +4,9 @@ name: "CodeQL" # 触发事件配置 # 在以下情况下触发工作流: -# 1. 推送到任意分支时 -# 2. 针对任意分支的拉取请求时 -# 3. 每天凌晨2点执行一次 +# 1. 针对任意分支的拉取请求时 +# 2. 每天凌晨2点执行一次 on: - push: - branches: [ '**' ] pull_request: branches: [ '**' ] schedule: