Skip to content

Commit

Permalink
Update sonar.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
felipemacedo1 authored Aug 20, 2024
1 parent ace18ae commit ad6efdc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ on:
workflow_dispatch:

permissions:
pull-requests: read # allows SonarQube to decorate PRs with analysis results

pull-requests: read
jobs:
Analysis:
runs-on: ubuntu-latest
Expand All @@ -19,13 +18,12 @@ jobs:
uses: actions/checkout@v2

- name: Analyze with SonarQube
# You can pin the exact commit or the version.
uses: SonarSource/sonarqube-scan-action@7295e71c9583053f5bf40e9d4068a0c974603ec8
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on SonarQube, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }} # add the URL of your instance to the secrets of this repo with the name SONAR_HOST_URL (Settings > Secrets > Actions > add new repository secret)
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
with:
args: >
-Dsonar.projectKey=FelipeAJdev_energyGames # Substitua por sua chave do projeto SonarQube
-Dsonar.sources=. # Define a raiz do projeto como fonte
-Dsonar.projectKey=FelipeAJdev_energyGames
-Dsonar.sources=.

0 comments on commit ad6efdc

Please sign in to comment.