Files
MaaAssistantArknights/.github/workflows/codeql-core.yml
dependabot[bot] 36084974d1 ci: bump actions/checkout from 5 to 6 in /.github/workflows in the github-actions group (#14847)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 23:39:04 +08:00

57 lines
1.4 KiB
YAML

name: CodeQL Code Analysis
on:
pull_request:
branches: ["dev"]
paths:
- ".github/workflows/codeql-core.yml"
- "3rdparty/include/**"
- "cmake/**"
- "CMakeLists.txt"
- "include/**"
- "src/**"
- "!**/*.md"
- "!**/*.xaml"
schedule:
- cron: "45 11 * * *" # Runs daily at 11:45 UTC
workflow_dispatch:
permissions:
actions: write
contents: read
packages: read
security-events: write
jobs:
analyze-manual:
name: Analyze MaaCore and MaaWpfGui
if: github.repository_owner == 'MaaAssistantArknights'
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
show-progress: false
- name: Setup CodeQL
uses: github/codeql-action/init@v4
with:
languages: c-cpp,csharp
build-mode: manual
- name: Run CodeQL
uses: github/codeql-action/analyze@v4
- name: Delete old caches
shell: pwsh
run: |
$oldCaches = gh cache list --key codeql --order asc --json key | ConvertFrom-Json | Select-Object -SkipLast 1
foreach ($cache in $oldCaches) {
if ($cache.key) {
Write-Host "Deleting cache: $($cache.key)"
gh cache delete $cache.key
}
}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}