CodeQL #141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "CodeQL" | |
on: | |
push: | |
branches: [ main, 'v[0-9]+.[0-9]+' ] | |
pull_request: | |
branches: [ main, 'v[0-9]+.[0-9]+' ] | |
schedule: | |
- cron: '38 16 * * 6' # At 4:38PM, every Saturday | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ubuntu-latest | |
env: | |
DOTNET_NOLOGO: 'true' | |
DOTNET_CLI_TELEMETRY_OPTOUT: 'true' | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 'true' | |
DOTNET_CLI_UI_LANGUAGE: 'en-US' | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'csharp' ] # https://aka.ms/codeql-docs/language-support | |
steps: | |
- name: Checkout repository with full history | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Checkout with full history so nbgv can compute Git height correctly. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
queries: security-and-quality | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v3 | |
with: | |
global-json-file: global.json | |
- name: Restore .NET tools | |
run: dotnet tool restore | |
- name: Build solution | |
run: | | |
if test "$RUNNER_DEBUG" == "1"; then | |
CAKE_VERBOSITY="Diagnostic" | |
elif test -z "$CAKE_VERBOSITY"; then | |
CAKE_VERBOSITY="Normal" | |
fi | |
dotnet cake --target Build --verbosity $CAKE_VERBOSITY | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:${{matrix.language}}" |