From 417501c00855994c563cee4214a9186f0866180d Mon Sep 17 00:00:00 2001 From: Jan Jansen Date: Thu, 25 Nov 2021 11:01:28 +0100 Subject: [PATCH] Fix code ql build --- .github/workflows/codeql-analysis.yml | 46 --------------------------- .github/workflows/dotnet.yml | 23 ++++++++++++++ 2 files changed, 23 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index a1df3493..00000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,46 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -#name: "CodeQL" -# -#on: -# push: -# branches: [ master ] -# pull_request: -# # The branches below must be a subset of the branches above -# branches: [ master ] -# schedule: -# - cron: '17 2 * * 6' -# -#jobs: -# analyze: -# name: Analyze -# runs-on: ubuntu-latest -# -# strategy: -# fail-fast: false -# matrix: -# language: [ 'csharp' ] -# steps: -# - name: Checkout repository -# uses: actions/checkout@v2 -# -# # Initializes the CodeQL tools for scanning. -# - name: Initialize CodeQL -# uses: github/codeql-action/init@v1 -# with: -# languages: ${{ matrix.language }} -# -# - name: Autobuild -# uses: github/codeql-action/autobuild@v1 -# -# - name: Perform CodeQL Analysis -# uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6ade9cd5..dd84bee7 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -54,6 +54,29 @@ jobs: name: artifacts-bridge path: ./artifacts-bridge/* + code-ql: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup .NET + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + + - name: Install dependencies + run: dotnet restore Motor.NET.sln + + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: csharp + + - name: Build + run: dotnet build --configuration Release --no-restore Motor.NET.sln + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 + deploy: needs: build if: github.event_name == 'release'