Skip to content

adding better logging #2701

adding better logging

adding better logging #2701

# Copyright 2022 MONAI Consortium
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: License Finder
on:
pull_request:
workflow_dispatch:
env:
DOTNET_VERSION: '6.0.x'
jobs:
scan:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
bundler-cache: true
- name: Install License Finder tool with Ruby
run: gem install license_finder
- name: Install Dotnet
uses: actions/setup-dotnet@v3
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: 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 License Scanning
id: license_scanning
run: license_finder -r
- name: Check License Header
uses: apache/[email protected]
- name: Check this step to see how to resolve failure with license scanning
if: ${{ failure() && steps.license_scanning.conclusion == 'failure' }}
run: echo "You have added a new package that needs to be manually checked to ensure it fits our license allowances. Please read the 'License Scanning' section of the 'CONTRIBUTING.MD' file to see what the next steps are."