Skip to content

Sync next with master #213

Sync next with master

Sync next with master #213

Workflow file for this run

name: NSoft SonarQube Analysis
on:
push:
branches:
- master
- next
pull_request:
jobs:
sq_scan_job:
runs-on: ubuntu-latest
name: SonarQube scan
if: ${{ github.actor != 'dependabot[bot]' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
- name: Run sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run:
if [ "$GITHUB_EVENT_NAME" = "push" ]; then
echo "$GITHUB_EVENT_NAME" &&
sonar-scanner
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.branch.name=${GITHUB_REF#refs/heads/};
elif [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
echo "$GITHUB_EVENT_NAME" &&
sonar-scanner
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }};
fi