mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-16 03:48:09 +00:00
Should fix codeql workflow (#2012)
* Build if csharp codeql * typo * Allow triggering the workflow manually
This commit is contained in:
26
.github/workflows/codeql-analysis.yml
vendored
26
.github/workflows/codeql-analysis.yml
vendored
@ -2,9 +2,10 @@ name: "CodeQL"
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ main ]
|
branches: [main]
|
||||||
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '29 3 * * 0'
|
- cron: "29 3 * * 0"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
@ -14,7 +15,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: ['csharp', 'python']
|
language: ["csharp", "python"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -27,5 +28,24 @@ jobs:
|
|||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
config-file: ./.github/codeql/codeql-config.yml
|
config-file: ./.github/codeql/codeql-config.yml
|
||||||
|
|
||||||
|
# Compiling is required for csharp
|
||||||
|
- name: Setup .NET Core SDK
|
||||||
|
if: ${{ matrix.language == 'csharp' }}
|
||||||
|
uses: actions/setup-dotnet@v2
|
||||||
|
with:
|
||||||
|
dotnet-version: "6.0.300"
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
if: ${{ matrix.language == 'csharp' }}
|
||||||
|
run: |
|
||||||
|
cd src/ApiService/
|
||||||
|
dotnet restore --locked-mode
|
||||||
|
|
||||||
|
- name: Build Service
|
||||||
|
if: ${{ matrix.language == 'csharp' }}
|
||||||
|
run: |
|
||||||
|
cd src/ApiService/
|
||||||
|
dotnet build -warnaserror --configuration Release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v2
|
uses: github/codeql-action/analyze@v2
|
||||||
|
Reference in New Issue
Block a user