Repository navigation
66 lines (57 loc) · 1.84 KB
/
Copy pathcodeql.yml
File metadata and controls
66 lines (57 loc) · 1.84 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
61
62
63
64
65
66
name: "CodeQL Analysis (C#)"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
permissions:
contents: read
jobs:
analyze-csharp:
name: CodeQL (C# / .NET 10)
runs-on: windows-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
DOTNET_CLI_FORCE_UTF8_ENCODING: "1"
permissions:
security-events: write
contents: read
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 1
persist-credentials: false
- name: Setup .NET 10 SDK
uses: actions/setup-dotnet@0f4a354dd5547a28c70b7853dbd95d5b67886e73 # v6.1.0
with:
global-json-file: global.json
cache: true
cache-dependency-path: |
global.json
Directory.Packages.props
src/**/*.csproj
tests/**/*.csproj
- name: Initialize CodeQL
uses: github/codeql-action/init@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
languages: csharp
build-mode: manual
config-file: ./.github/codeql/codeql-config.yml
- name: Build Solution for CodeQL
env:
MSBUILDDISABLENODEREUSE: "1"
DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER: "1"
run: dotnet build src/MinecraftServerManager.App/MinecraftServerManager.App.csproj -c Release -p:UseSharedCompilation=false
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3
with:
category: "/language:csharp"
upload: true