diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9a98965..b5275e5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,19 +22,10 @@ jobs: 8.0.x - name: Install dependencies run: dotnet restore - - name: Check for vulnerable packages - run: | - set -e # This will cause the script to exit on the first error - OUTPUT=$(dotnet list src/Elmah.Io.Functions/Elmah.Io.Functions.csproj package --vulnerable) - echo "$OUTPUT" - if echo "$OUTPUT" | grep -q 'no vulnerable packages'; then - echo "No vulnerable packages found" - else - if echo "$OUTPUT" | grep -q 'vulnerable'; then - echo "Vulnerable packages found" - exit 1 - fi - fi + - name: Check vulnerable NuGet packages + uses: elmahio/github-check-vulnerable-nuget-packages-action@v1 + with: + project: 'src/Elmah.Io.Functions/Elmah.Io.Functions.csproj' - name: Build run: dotnet build --configuration Release --no-restore - name: Test