Skip to content

Commit f533684

Browse files
committed
Refactor CodeQL analysis workflow to improve clarity and organization
1 parent 64499eb commit f533684

1 file changed

Lines changed: 9 additions & 22 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -42,37 +42,24 @@ jobs:
4242
- name: Checkout repository
4343
uses: actions/checkout@v4
4444

45-
# Initializes the CodeQL tools for scanning.
46-
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v4
48-
with:
49-
language: ${{ matrix.language }}
50-
51-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
52-
# If this step fails, then you should remove it and run the build manually (see below)
53-
# - name: Autobuild
54-
# uses: github/codeql-action/autobuild@v2
55-
56-
# ℹ️ Command-line programs to run using the OS shell.
57-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
58-
59-
# If the Autobuild fails above, remove it and uncomment the following three lines.
60-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
61-
62-
# - run: |
63-
# echo "Run, Build Application using script"
64-
# ./location_of_script_within_repo/buildscript.sh
6545
- name: Setup .NET SDK
6646
uses: actions/setup-dotnet@v5
6747
with:
6848
dotnet-version: 10.0.x
6949
include-prerelease: true
7050

51+
# Initializes the CodeQL tools for scanning.
52+
- name: Initialize CodeQL
53+
uses: github/codeql-action/init@v4
54+
with:
55+
language: ${{ matrix.language }}
56+
queries: security-and-quality
7157

7258
- name: Restore dependencies
73-
run: dotnet restore CleanArchitecture.Blazor.slnx
59+
run: dotnet restore CleanArchitecture.Blazor.slnx
60+
7461
- name: Build
75-
run: dotnet build CleanArchitecture.Blazor.slnx --configuration Debug --no-restore
62+
run: dotnet build CleanArchitecture.Blazor.slnx --configuration Release --no-restore
7663

7764
- name: Perform CodeQL Analysis
7865
uses: github/codeql-action/analyze@v4

0 commit comments

Comments
 (0)