Run CodeQL without building the solution (#17473)

* run codeql without building the solution

* restore dotnet

* Revert "restore dotnet"

This reverts commit 3e22bc1a760a350366bed0a335ced6116e7c2c28.

* Revert "run codeql without building the solution"

This reverts commit 9ceaea778124a73e0d7ff0c29ab192cf4700ae60.

* use global.json for codeql

* do not build solution
This commit is contained in:
Jacob Overgaard
2024-11-09 16:07:40 +01:00
committed by GitHub
parent 6bf3c5078d
commit 1757dd0ada

View File

@@ -45,15 +45,17 @@ jobs:
matrix:
include:
- language: csharp
build-mode: manual
build-mode: none
- language: javascript-typescript
build-mode: none
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# We use the setup-dotnet action to set up .NET Core, otherwise the CodeQL CLI will not work with preview versions.
- name: Setup .NET from global.json
uses: actions/setup-dotnet@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
@@ -63,19 +65,6 @@ jobs:
build-mode: ${{ matrix.build-mode }}
config-file: ./.github/config/codeql-config.yml
- if: matrix.build-mode == 'manual'
name: Use .NET ${{ env.dotnetVersion }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnetVersion }}
dotnet-quality: ${{ env.dotnetIncludePreviewVersions }}
- if: matrix.build-mode == 'manual'
shell: bash
run: |
dotnet restore ${{ env.solution }}
dotnet build ${{ env.solution }} --configuration ${{ env.buildConfiguration }} --no-restore -p:ContinuousIntegrationBuild=true
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with: