Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,26 @@ on:
- main
pull_request:
types: [opened, synchronize, reopened]

permissions:
contents: read
pull-requests: read
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
# Secrets are not available to workflows triggered from forked pull requests.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Checkout 🛒
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: SonarCloud Scan 🔍
uses: SonarSource/sonarcloud-github-action@master
uses: SonarSource/sonarqube-scan-action@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ github.token }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ env.SONAR_TOKEN }}