-
Notifications
You must be signed in to change notification settings - Fork 83
53 lines (44 loc) · 1.15 KB
/
Copy pathcodeql-analysis.yml
File metadata and controls
53 lines (44 loc) · 1.15 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
name: "CodeQL Scan - C#"
on:
push:
pull_request:
types: [opened, synchronize, reopened]
branches: [main]
paths-ignore:
- ".github/workflows/**"
- "**/*.md"
- "**/*.yml"
jobs:
codeql:
name: CodeQL Analysis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dotnet: ["10.0"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: csharp
build-mode: manual
dependency-caching: true
- name: Restore dependencies
run: dotnet restore Shop.slnx
- name: Build solution
run: dotnet build Shop.slnx --configuration Release --no-restore
- name: Autobuild fallback
if: failure()
uses: github/codeql-action/autobuild@v4
- name: Run CodeQL analysis
uses: github/codeql-action/analyze@v4
with:
category: "security"