-
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) Β· 1.38 KB
/
codeql.yml
File metadata and controls
60 lines (49 loc) Β· 1.38 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
59
60
name: π CodeQL Security Analysis
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * 1' # Every Monday at midnight
workflow_dispatch:
jobs:
analyze:
name: π Analyze C#
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
packages: read
steps:
- name: π₯ Checkout repository
uses: actions/checkout@v6
- name: π§ Setup .NET SDKs
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x
10.0.x
dotnet-quality: 'preview'
- name: βοΈ Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: csharp
config-file: ./.github/codeql/codeql-config.yml
- name: ποΈ Build Projects
run: |
echo "π¦ Restoring dependencies..."
dotnet restore JsonViewer.Blazor.sln
echo "ποΈ Building Component..."
dotnet build src/Component/Component.csproj -c Release --no-restore
echo "ποΈ Building Demo..."
dotnet build src/Blazor.Demo/Blazor.Demo.csproj -c Release --no-restore
echo "β
Build completed"
- name: π Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:csharp"