chore(ci): 更新GitHub Actions工作流配置

- 移除push触发器,仅保留pull request触发CI构建测试
- 添加CodeQL静态代码分析工作流,支持安全漏洞检测
- 配置每日凌晨2点定时执行CodeQL分析
- 设置.NET 8.0.x运行时环境支持
- 启用C#语言自动构建模式进行代码扫描
This commit is contained in:
GeWuYou 2026-04-15 12:51:59 +08:00
parent 0cd1e9e83a
commit 340b6cae90
2 changed files with 3 additions and 8 deletions

View File

@ -1,10 +1,8 @@
# CI/CD工作流配置构建和测试.NET项目
# 该工作流推送到任意分支或创建面向任意分支的 pull request 时触发
# 该工作流在创建或更新面向任意分支的 pull request 时触发
name: CI - Build & Test
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]

View File

@ -4,12 +4,9 @@ name: "CodeQL"
# 触发事件配置
# 在以下情况下触发工作流:
# 1. 推送到任意分支时
# 2. 针对任意分支的拉取请求时
# 3. 每天凌晨2点执行一次
# 1. 针对任意分支的拉取请求时
# 2. 每天凌晨2点执行一次
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
schedule: