diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1aee984..dacde6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,28 +1,21 @@ +name: Build on: - # Trigger analysis when pushing in master or pull requests, and when creating - # a pull request. push: branches: - - master + - master + - test pull_request: types: [opened, synchronize, reopened] - -name: Main Workflow jobs: - sonarqube: + sonarcloud: + name: SonarCloud runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: - # Disabling shallow clone is recommended for improving relevancy of reporting - fetch-depth: 0 - - name: SonarQube Scan - uses: sonarsource/sonarqube-scan-action@master + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - - name: SonarQube Quality Gate check - uses: sonarsource/sonarqube-quality-gate-action@master - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties index 52d35d4..a66f6b3 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -1 +1,2 @@ -sonar.projectKey=VulnAppStatusCheck \ No newline at end of file +sonar.projectKey=Shobika_Vulnerable-Web-Application +sonar.organization=shobika \ No newline at end of file