diff --git a/.github/workflows/build.yml.exclude b/.github/workflows/build.yml similarity index 63% rename from .github/workflows/build.yml.exclude rename to .github/workflows/build.yml index 26e304c..3a6becb 100644 --- a/.github/workflows/build.yml.exclude +++ b/.github/workflows/build.yml @@ -1,27 +1,32 @@ -name: Build +name: SonarCloud on: push: branches: - - master + - develop pull_request: types: [opened, synchronize, reopened] jobs: build: - name: Build + name: Build and analyze runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - name: Set up JDK 17 + uses: actions/setup-java@v3 + with: + java-version: 17 + distribution: 'zulu' # Alternative distribution options are available. + - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - name: Cache SonarCloud packages - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: ~\sonar\cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache SonarCloud scanner id: cache-sonar-scanner - uses: actions/cache@v1 + uses: actions/cache@v3 with: path: .\.sonar\scanner key: ${{ runner.os }}-sonar-scanner @@ -38,6 +43,6 @@ jobs: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} shell: powershell run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"Amitpnk_Onion-architecture-ASP.NET-Core" /o:"amitpnk" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" - - .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" \ No newline at end of file + .\.sonar\scanner\dotnet-sonarscanner begin /k:"marrbo_Onion-architecture-ASP.NET-Core" /o:"marrbo" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" + + .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"