1
- # For most projects, this workflow file will not need changing; you simply need
2
- # to commit it to your repository.
3
- #
4
- # You may wish to alter this file to override the set of languages analyzed,
5
- # or to provide custom queries or build logic.
6
- #
7
- # ******** NOTE ********
8
- # We have attempted to detect the languages in your repository. Please check
9
- # the `language` matrix defined below to confirm you have the correct set of
10
- # supported CodeQL languages.
11
- #
1
+ # https://codeql.github.com/
2
+ # https://codeql.github.com/docs/codeql-overview/supported-languages-and-frameworks/
12
3
name : " CodeQL"
13
4
14
5
on :
15
6
push :
16
7
branches : [ main, live ]
17
8
pull_request :
18
- # The branches below must be a subset of the branches above
19
9
branches : [ main ]
20
10
schedule :
21
11
- cron : ' 30 13 * * 2'
@@ -33,39 +23,34 @@ jobs:
33
23
fail-fast : false
34
24
matrix :
35
25
language : [ 'csharp', 'javascript' ]
36
- # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37
- # Learn more:
38
- # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39
26
40
27
steps :
41
28
- name : Checkout repository
42
29
uses : actions/checkout@main
43
30
44
- # Initializes the CodeQL tools for scanning.
45
31
- name : Initialize CodeQL
46
32
uses : github/codeql-action/init@main
47
33
with :
48
34
languages : ${{ matrix.language }}
49
- # If you wish to specify custom queries, you can do so here or in a config file.
50
- # By default, queries listed here will override any specified in a config file.
51
- # Prefix the list here with "+" to use these queries and those in the config file.
52
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
53
35
54
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
55
- # If this step fails, then you should remove it and run the build manually (see below)
56
- - name : Autobuild
36
+ - name : Build JavaScript
37
+ if : ${{ matrix.language == 'javascript' }}
57
38
uses : github/codeql-action/autobuild@main
58
39
59
- # ℹ️ Command-line programs to run using the OS shell.
60
- # 📚 https://git.io/JvXDl
40
+ - name : Setup .NET
41
+ if : ${{ matrix.language == 'csharp' }}
42
+ uses : actions/setup-dotnet@main
43
+ with :
44
+ dotnet-version : 9.0.x
61
45
62
- # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
63
- # and modify them (or add more) to build your code if your project
64
- # uses a compiled language
46
+ - name : Install dependencies
47
+ if : ${{ matrix.language == 'csharp' }}
48
+ run : dotnet restore
65
49
66
- # - run: |
67
- # make bootstrap
68
- # make release
50
+ - name : Build .NET
51
+ if : ${{ matrix.language == 'csharp' }}
52
+ run : |
53
+ dotnet build --configuration Release --no-restore
69
54
70
55
- name : Perform CodeQL Analysis
71
56
uses : github/codeql-action/analyze@v3
0 commit comments