25 lines
679 B
YAML
25 lines
679 B
YAML
|
on:
|
||
|
push:
|
||
|
|
||
|
name: SonarQube Scan
|
||
|
jobs:
|
||
|
sonarqube:
|
||
|
name: SonarQube Trigger
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Checking out
|
||
|
uses: actions/checkout@v4
|
||
|
with:
|
||
|
# Disabling shallow clone is recommended for improving relevancy of reporting
|
||
|
fetch-depth: 0
|
||
|
- name: get repository name
|
||
|
run: echo "REPOSITORY_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
|
||
|
- name: SonarQube Scan
|
||
|
uses: sonarsource/sonarqube-scan-action@v4
|
||
|
env:
|
||
|
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }}
|
||
|
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }}
|
||
|
with:
|
||
|
args: >
|
||
|
-Dsonar.projectKey=${{ env.REPOSITORY_NAME }}
|