CodeQL Scanning - Action #139
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 Scanning - Action" | |
on: | |
schedule: | |
- cron: '0 3 * * 1' | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: windows-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: ['csharp'] | |
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] | |
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
path: Dynamo | |
repository: DynamoDS/Dynamo | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6.0.x' | |
# Initializes the CodeQL tools for scanning. | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v3 | |
with: | |
debug: true | |
languages: ${{ matrix.language }} | |
# If you wish to specify custom queries, you can do so here or in a config file. | |
# By default, queries listed here will override any specified in a config file. | |
# Prefix the list here with "+" to use these queries and those in the config file. | |
# 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 | |
# queries: security-extended,security-and-quality | |
# ℹ️ Command-line programs to run using the OS shell. | |
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun | |
- name: Install dependencies for windows runtime | |
run: dotnet restore $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln --runtime=win-x64 | |
- name: Build Dynamo with MSBuild for Windows | |
run: | | |
echo "***Continue with the build, Good luck developer!***" | |
cd "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\" | |
.\MSBuild.exe $Env:GITHUB_WORKSPACE\Dynamo\src\Dynamo.All.sln /p:Configuration=Release | |
- name: Navigate back to Dynamo directory | |
run: | | |
cd $Env:GITHUB_WORKSPACE\Dynamo | |
cd | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |