diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ef9be23..1144cf6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,25 +1,27 @@ on: + # Trigger analysis when pushing in master or pull requests, and when creating + # a pull request. push: branches: - - master # or the name of your main branch - pull_request: - types: [opened, synchronize, reopened] + - master + pull_request: + types: [opened, synchronize, reopened] +name: Main Workflow jobs: - build: - name: Build + sonarqube: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 with: + # Disabling shallow clone is recommended for improving relevancy of reporting fetch-depth: 0 - - uses: sonarsource/sonarqube-scan-action@master + - name: SonarQube Scan + uses: sonarsource/sonarqube-scan-action@master env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} - # If you wish to fail your job when the Quality Gate is red, uncomment the - # following lines. This would typically be used to fail a deployment. - - uses: sonarsource/sonarqube-quality-gate-action@master - timeout-minutes: 5 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + - uses: sonarsource/sonarqube-quality-gate-action@master + timeout-minutes: 5 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file