Skip to content

Commit

Permalink
Update sonarcloud.yml (#39)
Browse files Browse the repository at this point in the history
* Update sonarcloud.yml

* Update sonarcloud.yml

* Update sonarcloud.yml

* Update sonarcloud.yml

* Update sonarcloud.yml via gpt4

* Update sonarcloud.yml

* Update sonarcloud.yml

* Update workflows

* Update build.yml

* Update metadata for sonarcloud

* Update build.yml

* chore: Update SonarCloud configuration

* chore: Update SonarCloud configuration

* chore: Update SonarCloud configuration
  • Loading branch information
Devasy23 authored May 8, 2024
1 parent c5b501b commit 3c5170e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,24 @@ on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
types: [opened, synchronize, reopened]
workflow_dispatch:

permissions:
contents: read
security-events: write
pull-requests: read # allows SonarCloud to decorate PRs with analysis results

jobs:
Analysis:
runs-on: ubuntu-latest

steps:
- name: Analyze with SonarCloud
- name: Checkout repository
uses: actions/checkout@v4

# You can pin the exact commit or the version.
# uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
- name: Analyze with SonarCloud
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.C_PAT }} # Needed to get PR information
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret)
with:
# Additional arguments for the sonarcloud scanner
args:
-Dsonar.projectKey=
-Dsonar.organization=

GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Provided by GitHub Actions, no need for custom PAT unless required
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # SonarCloud secret token
2 changes: 2 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sonar.organization=devasy23
sonar.projectKey=Devasy23_FaceRec

0 comments on commit 3c5170e

Please sign in to comment.