From db755cccaef9410d94f0735afd576030f2d5474a Mon Sep 17 00:00:00 2001 From: Vladimir Bondarevskiy Date: Sun, 30 May 2021 03:14:48 +0300 Subject: [PATCH] fix --- .github/workflows/sonar-scanner.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sonar-scanner.yml b/.github/workflows/sonar-scanner.yml index c1b8c8a..b341e09 100644 --- a/.github/workflows/sonar-scanner.yml +++ b/.github/workflows/sonar-scanner.yml @@ -1,11 +1,12 @@ name: sonar-scanner on: + pull_request: + branches: + - master push: branches: - master - pull_request: - types: [opened, synchronize, reopened] jobs: SonarScanner: @@ -16,12 +17,6 @@ jobs: uses: actions/checkout@v1 - name: Setup SonarQube scanner uses: warchant/setup-sonar-scanner@v1 - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true - - name: Extract version - shell: bash - run: echo "##[set-output name=version;]` cat ./src/CommonModules/КоннекторHTTP/Ext/Module.bsl | grep -oP '(?<=Версия:.)[\d|.]*'`" - id: extract_version - name: Run SonarQube on push if: github.event_name == 'push' env: @@ -30,7 +25,6 @@ jobs: -Dsonar.login=${{ secrets.SONAR_TOKEN }} -Dsonar.host.url=https://sonar.openbsl.ru -Dsonar.branch.name=${GITHUB_REF#refs/heads/} - -Dsonar.projectVersion=${{ steps.extract_version.outputs.version }} - name: Run SonarQube on pull request if: github.event_name == 'pull_request' env: @@ -42,4 +36,3 @@ jobs: -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.projectVersion=${{ steps.extract_version.outputs.version }}