File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name: Sonar
33 push :
44 branches :
55 - main
6- pull_request :
6+ pull_request_target :
77 branches :
88 - main
99 schedule :
1616 - uses : actions/checkout@v2
1717 with :
1818 fetch-depth : 0
19+ - name : Check for external PR
20+ if : ${{ !(contains(github.event.pull_request.labels.*.name, 'safe') ||
21+ github.event.pull_request.head.repo.full_name == github.repository ||
22+ github.event_name != 'pull_request_target') }}
23+ run : echo "Unsecure PR, must be labelled with the 'safe' label, then run the workflow again" && exit 1
1924 - name : Set up Python 3.8
2025 uses : actions/setup-python@v2
2126 with :
3338 uses : SonarSource/sonarcloud-github-action@master
3439 env :
3540 GITHUB_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
36- SONAR_TOKEN : ' ${{ secrets.SONAR_TOKEN }}'
41+ SONAR_TOKEN : ' ${{ secrets.SONAR_TOKEN }}'
You can’t perform that action at this time.
0 commit comments