-
Notifications
You must be signed in to change notification settings - Fork 223
38 lines (32 loc) · 1.08 KB
/
main.yml
File metadata and controls
38 lines (32 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: sonar-scanner
on:
push:
branches:
- develop
jobs:
SonarScanner:
if: github.repository == 'Pr-Mex/vanessa-automation'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Вычисление имени ветки
uses: nelonoel/branch-name@v1.0.1
- name: Извлечение версии
shell: bash
run: echo "version=$(grep -oP '(?<=Версия \= \").[\d|.]*' ./VanessaAutomation/Ext/ObjectModule.bsl)" >> "$GITHUB_OUTPUT"
id: extract_version
- name: Настройка sonar-scanner
uses: warchant/setup-sonar-scanner@v9
- name: SonarCloud Scan on push
if: github.event_name == 'push'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
sonar-scanner \
-Dsonar.host.url=https://sonar.openbsl.ru \
-Dsonar.branch.name=${{ env.BRANCH_NAME }} \
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }}