Skip to content

Commit

Permalink
Update sonar.yml
Browse files Browse the repository at this point in the history
Добавлена проверка пулл-реквестов
  • Loading branch information
ivanmolodec authored Feb 12, 2024
1 parent 2da9991 commit 3d51f63
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: QA

on:
push:
pull_request:
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -29,4 +30,16 @@ jobs:
run: sonar-scanner
-Dsonar.host.url=https://sonar.openbsl.ru
-Dsonar.branch.name=${{ env.BRANCH_NAME }}
# Анализ проекта в SonarQube (пулл-реквест)
- name: Анализ в SonarQube (pull-request)
if: github.event_name == 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: sonar-scanner
-Dsonar.host.url=https://sonar.openbsl.ru
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}

0 comments on commit 3d51f63

Please sign in to comment.