Skip to content

Commit 7bf6c4a

Browse files
modefied
1 parent 2a73eb0 commit 7bf6c4a

File tree

1 file changed

+15
-22
lines changed

1 file changed

+15
-22
lines changed

.github/workflows/codeql.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
# the `language` matrix defined below to confirm you have the correct set of
1010
# supported CodeQL languages.
1111
#
12+
# You may need to adjust this file for your specific repository or build process.
13+
1214
name: "CodeQL"
1315

1416
on:
@@ -48,12 +50,12 @@ jobs:
4850
uses: actions/checkout@v3
4951

5052
# Installing DotNet version
51-
- uses: actions/checkout@v3
5253
- name: Setup dotnet ${{ matrix.dotnet-version }}
5354
uses: actions/setup-dotnet@v3
5455
with:
55-
dotnet-version: ${{ matrix.dotnet-version }}
56-
# You can test your matrix by printing the current dotnet version
56+
dotnet-version: ${{ matrix.dot-version }}
57+
58+
# Display dotnet version for confirmation
5759
- name: Display dotnet version
5860
run: dotnet --version
5961

@@ -62,30 +64,21 @@ jobs:
6264
uses: github/codeql-action/init@v2
6365
with:
6466
languages: ${{ matrix.language }}
65-
# If you wish to specify custom queries, you can do so here or in a config file.
66-
# By default, queries listed here will override any specified in a config file.
67-
# Prefix the list here with "+" to use these queries and those in the config file.
68-
69-
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
70-
# queries: security-extended,security-and-quality
71-
72-
73-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
74-
# If this step fails, then you should remove it and run the build manually (see below)
75-
- name: Autobuild
76-
uses: github/codeql-action/autobuild@v2
77-
78-
# ?? Command-line programs to run using the OS shell.
79-
# ?? See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
80-
81-
# If the Autobuild fails above, remove it and uncomment the following three lines.
82-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
67+
# You can customize the queries here or in a config file.
8368

69+
# Manually build the C# project using dotnet build
70+
- name: Build the C# project
71+
if: matrix.language == 'csharp'
72+
run: |
73+
dotnet restore
74+
dotnet build --configuration Release
75+
76+
# If autobuild fails, manually trigger the build here for other languages.
8477
# - run: |
8578
# echo "Run, Build Application using script"
8679
# ./location_of_script_within_repo/buildscript.sh
8780

8881
- name: Perform CodeQL Analysis
8982
uses: github/codeql-action/analyze@v2
9083
with:
91-
category: "/language:${{matrix.language}}"
84+
category: "/language:${{matrix.language}}"

0 commit comments

Comments
 (0)