Skip to content

Static Analysis Runner #13

Static Analysis Runner

Static Analysis Runner #13

name: Static Analysis Runner
on:
workflow_run:
workflows: ["Static Analysis Trigger"]
types:
- completed
jobs:
static-analysis:
runs-on: windows-latest
steps:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Set up JDK
uses: actions/setup-java@v2.4.0
with:
distribution: 'zulu'
java-version: 15.0
- name: Cache SonarCloud packages
uses: actions/cache@v2.1.7
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v2.1.7
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner
- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: powershell
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Build and analyze
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
git clone
.\.sonar\scanner\dotnet-sonarscanner begin /k:"baynezy_deep-secure-threat-removal-sdk" /o:"baynezy" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build --configuration Release
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"