Skip to content

Commit 2896927

Browse files
authored
Update sonarcloud.yml
1 parent dc88a53 commit 2896927

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
1-
name: SonarCloud Scan
1+
name: Build
22
on:
3-
pull_request_target:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [opened, synchronize, reopened]
48
jobs:
59
sonarcloud:
610
name: SonarCloud
711
runs-on: ubuntu-latest
812
steps:
9-
- name: Checkout repo
10-
uses: actions/checkout@v2
13+
- uses: actions/checkout@v3
1114
with:
12-
ref: ${{ github.event.pull_request.head.ref }}
13-
repository: ${{ github.event.pull_request.head.repo.full_name }}
1415
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
1516
- name: SonarCloud Scan
1617
uses: SonarSource/sonarcloud-github-action@master
1718
env:
1819
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
19-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
20+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)