Skip to content

Commit

Permalink
Update sonar.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
leventeBajczi authored Feb 26, 2024
1 parent 3171daf commit 9d22a98
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
pull_request_target:
types: [opened, synchronize, reopened]

permissions: read-all

concurrency:
group: sonar-${{ github.head_ref }}
cancel-in-progress: true
Expand Down Expand Up @@ -37,11 +39,12 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
persist-credentials: false
- name: Analyze in PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
if: env.SONAR_TOKEN != '' && github.event_name == 'pull_request_target'
if: env.SONAR_TOKEN != '' && github.event_name == 'pull_request_target' && contains(github.event.pull_request.labels.*.name, 'Ready to merge')
uses: gradle/gradle-build-action@40b6781dcdec2762ad36556682ac74e31030cfe2 # v2.5.1
with:
arguments: build jacocoTestReport sonar --info -Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m -Dsonar.pullrequest.key=${{ github.event.pull_request.number }}

0 comments on commit 9d22a98

Please sign in to comment.