@@ -45,10 +45,10 @@ jobs:
4545 - uses : actions/setup-dotnet@v3
4646 with :
4747 dotnet-version : " 6.0.x"
48-
48+
4949 - name : Enable Homebrew
5050 run : echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
51-
51+
5252 - name : Install License Finder tool with Homebrew
5353 uses : tecoli-com/actions-use-homebrew-tools@v1
5454 with :
@@ -80,12 +80,12 @@ jobs:
8080
8181 - name : Secret detection
828283-
83+
8484 - name : Perform License Scanning
8585 run : license_finder -r
8686
8787 - name : Check License Header
88- uses : apache/skywalking-eyes@main
88+ uses : apache/skywalking-eyes@v0.4.0
8989
9090 unit-test :
9191 runs-on : ubuntu-latest
@@ -111,34 +111,34 @@ jobs:
111111 - uses : actions/checkout@v3
112112 with :
113113 fetch-depth : 0
114-
114+
115115 - name : Install SonarCloud scanner
116116 if : steps.cache-sonar-scanner.outputs.cache-hit != 'true'
117117 run : dotnet tool install --global dotnet-sonarscanner
118118
119119 - name : Restore dependencies
120120 run : dotnet restore
121121 working-directory : ./src
122-
122+
123123 - name : Begin SonarScanner
124124 env :
125125 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
126126 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
127127 run : dotnet sonarscanner begin /k:"Project-MONAI_monai-deploy-storage" /o:"project-monai" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="${{ env.TEST_RESULTS }}/**/*.xml"
128128 working-directory : ./src
129-
129+
130130 - name : Build
131131 env :
132132 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
133133 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
134134 run : dotnet build -c ${{ env.BUILD_CONFIG }} --nologo "${{ env.SOLUTION }}"
135135 working-directory : ./src
136-
136+
137137 - name : Test
138138 env :
139139 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
140140 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
141- run : find ~+ -type f -name "*.Test.csproj" | xargs -L1 dotnet test -c ${{ env.BUILD_CONFIG }} -v=minimal -r "${{ env.TEST_RESULTS }}" --collect:"XPlat Code Coverage" --settings coverlet.runsettings
141+ run : find ~+ -type f -name "*.Test.csproj" | xargs -L1 dotnet test -c ${{ env.BUILD_CONFIG }} -v=minimal -r "${{ env.TEST_RESULTS }}" --collect:"XPlat Code Coverage" --settings coverlet.runsettings
142142 working-directory : ./src
143143
144144 - name : End SonarScanner
@@ -147,7 +147,7 @@ jobs:
147147 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
148148 run : dotnet sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
149149 working-directory : ./src
150-
150+
151151 - uses : codecov/codecov-action@v3
152152 with :
153153 token : ${{ secrets.CODECOV_TOKEN }}
@@ -160,7 +160,7 @@ jobs:
160160
161161 build :
162162 runs-on : ${{ matrix.os }}
163-
163+
164164 outputs :
165165 majorMinorPatch : ${{ steps.gitversion.outputs.majorMinorPatch }}
166166
@@ -174,7 +174,7 @@ jobs:
174174 packages : write
175175 checks : write
176176 security-events : write
177-
177+
178178 steps :
179179 - name : Checkout repository
180180 uses : actions/checkout@v3
@@ -212,6 +212,13 @@ jobs:
212212 run : dotnet build -c ${{ env.BUILD_CONFIG }} --nologo ${{ env.SOLUTION }}
213213 working-directory : ./src
214214
215+ - name : Nuget Vulnerabiilty Scan
216+ run : |
217+ dotnet list package --vulnerable 2>&1 | tee vulnerable.txt
218+ echo "Analyzing dotnet list package command log output..."
219+ sh -c "! grep 'has the following vulnerable packages' vulnerable.txt"
220+ working-directory : ./src
221+
215222 - name : Package
216223 env :
217224 PACKAGEDIR : ' ${{ github.workspace }}/release/'
@@ -221,14 +228,14 @@ jobs:
221228 dotnet pack --no-build -c ${{ env.BUILD_CONFIG }} -o $PACKAGEDIR -p:PackageVersion=${{ steps.gitversion.outputs.nuGetVersionV2 }}
222229 ls -lR $PACKAGEDIR
223230 working-directory : ./src
224-
231+
225232 - name : Zip Plug-ins
226233 if : ${{ matrix.os == 'ubuntu-latest' }}
227234 run : |
228235 ./package.sh
229236 ls -lR release/
230237 working-directory : ./src/Plugins
231-
238+
232239 - name : Upload Nuget
233240 if : ${{ matrix.os == 'ubuntu-latest' }}
234241@@ -266,10 +273,10 @@ jobs:
266273 with :
267274 dotnet-version : " 6.0.x"
268275 source-url : https://nuget.pkg.github.com/Project-MONAI/index.json
269-
276+
270277 - name : Publish to GitHub
271278 run : gpr push '${{ steps.download.outputs.download-path }}/nuget/*.nupkg' --repository ${{ github.repository }} -k ${{ secrets.GITHUB_TOKEN }}
272-
279+
273280 release-nuget :
274281 name : Official Release to GitHub Packages
275282 runs-on : ubuntu-latest
@@ -291,10 +298,10 @@ jobs:
291298 with :
292299 dotnet-version : " 6.0.x"
293300 source-url : https://nuget.pkg.github.com/Project-MONAI/index.json
294-
301+
295302 - name : Publish to GitHub
296303 run : gpr push '${{ steps.download.outputs.download-path }}/nuget/*.nupkg' --repository ${{ github.repository }} -k ${{ secrets.GITHUB_TOKEN }}
297-
304+
298305 release :
299306 name : Official Release to NuGet.org
300307 if : ${{ github.event.inputs.nuget || contains(github.ref, 'refs/heads/release') }}
@@ -313,7 +320,7 @@ jobs:
313320
314321 - name : List artifacts
315322 run : ls -ldR ${{steps.download.outputs.download-path}}/**/*
316-
323+
317324 - name : Publish to NuGet.org
318325 run : dotnet nuget push ${{ steps.download.outputs.download-path }}/nuget/*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET }} --skip-duplicate
319326
0 commit comments