Files
MaaAssistantArknights/.github/workflows/codeql.yml
dependabot[bot] e01e4d2f90 ci: bump the github-actions group in /.github/workflows with 2 updates (#13648)
Bumps the github-actions group in /.github/workflows with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/download-artifact](https://github.com/actions/download-artifact).


Updates `actions/checkout` from 4 to 5
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

Updates `actions/download-artifact` from 4 to 5
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-12 09:32:59 +08:00

92 lines
2.4 KiB
YAML

name: "CodeQL Advanced"
on:
pull_request:
branches: ["dev"]
schedule:
- cron: "45 11 * * *"
workflow_dispatch:
permissions:
actions: write
contents: read
packages: read
security-events: write
jobs:
analyze-none:
name: Analyze CI and MaaWebsite
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
show-progress: false
- name: Setup CodeQL
uses: github/codeql-action/init@v3
with:
languages: javascript-typescript,actions
build-mode: none
- name: Run CodeQL
uses: github/codeql-action/analyze@v3
with:
category: "/language:multi-none"
analyze-manual:
name: Analyze MaaCore and MaaWpfGui
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
with:
show-progress: false
- name: Setup build environments
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git submodule update --init --depth 1 3rdparty/EmulatorExtras
dotnet restore
python3 maadeps-download.py x64-windows
- name: Create fake event file
shell: bash
run: cp -v "$GITHUB_EVENT_PATH" ./event.json
- name: Setup CodeQL
uses: github/codeql-action/init@v3
with:
languages: c-cpp,csharp
build-mode: manual
- name: Build MAA
shell: pwsh
run: |
$env:GITHUB_WORKFLOW = 'dev-build-win'
$env:GITHUB_EVENT_PATH = "$pwd\\event.json"
$env:GITHUB_REF = "refs/heads/not_master"
$env:MAA_BUILDER_MAA_VERSION = 'v0.0.1'
./build.cmd DevBuild
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run CodeQL
uses: github/codeql-action/analyze@v3
with:
category: "/language:multi-manual"
- 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 }}