Added info to the csproj to generate package.lock for caching #2725
This file contains hidden or 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
# SPDX-FileCopyrightText: © 2021-2022 MONAI Consortium | |
# SPDX-License-Identifier: Apache License 2.0 | |
name: CodeQL | |
on: | |
push: | |
workflow_dispatch: | |
env: | |
DOTNET_VERSION: '6.0.x' | |
jobs: | |
analyze: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install Dotnet | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Enable NuGet cache | |
uses: actions/[email protected] | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v1 | |
with: | |
languages: csharp | |
- name: Restore Solution | |
run: dotnet restore Monai.Deploy.WorkflowManager.sln | |
working-directory: ./src | |
- name: Build Solution | |
run: dotnet build -c Release --nologo --no-restore Monai.Deploy.WorkflowManager.sln | |
working-directory: ./src | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v1 |