mirror of
https://github.com/bia-technologies/yaxunit.git
synced 2024-12-03 08:45:31 +02:00
Create sq.yml
This commit is contained in:
parent
552d6630a5
commit
59f0e247d3
45
.github/workflows/sq.yml
vendored
Normal file
45
.github/workflows/sq.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
name: sq-analyze
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
SonarScanner:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
repository: ${{ github.event.workflow_run.head_repository.full_name }}
|
||||||
|
ref: ${{ github.event.workflow_run.head_branch }}
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Configure env vars for SonarCloud scan
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
|
run: |
|
||||||
|
echo "::set-env name=PATH::/opt/sonar-scanner/bin:$PATH"
|
||||||
|
|
||||||
|
- name: Compute branch name
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
|
uses: nixel2007/branch-name@v3
|
||||||
|
|
||||||
|
- name: Extract version
|
||||||
|
shell: bash
|
||||||
|
run: echo "##[set-output name=version;]` cat ./yaxunit/exts/yaxunit/src/Configuration/Configuration.mdo | grep -oP '<version>(.*)<\/version>'`"
|
||||||
|
id: extract_version
|
||||||
|
|
||||||
|
- name: SonarCloud Scan on push
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: nixel2007/sonarcloud-github-action@v1.4
|
||||||
|
env:
|
||||||
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
|
with:
|
||||||
|
args: >
|
||||||
|
-Dsonar.host.url=https://sonar.openbsl.ru
|
||||||
|
-Dsonar.branch.name=${{ env.BRANCH_NAME }}
|
||||||
|
-Dsonar.projectVersion=${{ steps.extract_version.outputs.version }}
|
Loading…
Reference in New Issue
Block a user