Repository navigation
58 lines (49 loc) · 1.45 KB
/
Copy pathcodeql.yml
File metadata and controls
58 lines (49 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CodeQL
on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '23 4 * * 1'
workflow_dispatch:
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: read
contents: read
security-events: write
jobs:
analyze:
name: Analyze C#
runs-on: windows-latest
timeout-minutes: 45
# Code scanning upload requires a write token; fork pull requests only get a
# read-only token, so let the post-merge push scan run for those.
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
steps:
- uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
global-json-file: global.json
cache: true
cache-dependency-path: |
**/*.csproj
global.json
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: csharp
build-mode: manual
queries: security-and-quality
config-file: ./.github/codeql/codeql-config.yml
- name: Restore
run: dotnet restore CHDMounter/CHDMounter.csproj
- name: Build for CodeQL
run: dotnet build CHDMounter/CHDMounter.csproj -c Release --no-restore
- name: Perform CodeQL analysis
uses: github/codeql-action/analyze@v4
with:
category: /language:csharp