22 lines
644 B
YAML
22 lines
644 B
YAML
|
|
name: SonarQube Scan
|
||
|
|
on: [push]
|
||
|
|
jobs:
|
||
|
|
sonarqube:
|
||
|
|
runs-on: docker
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
with:
|
||
|
|
fetch-depth: 0
|
||
|
|
- name: Set project key
|
||
|
|
id: vars
|
||
|
|
run: echo "key=$(echo '${{ github.repository }}' | tr '/' '_')" >> "$GITHUB_OUTPUT"
|
||
|
|
- uses: sonarsource/sonarqube-scan-action@v5
|
||
|
|
env:
|
||
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||
|
|
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||
|
|
with:
|
||
|
|
args: >
|
||
|
|
-Dsonar.projectKey=${{ steps.vars.outputs.key }}
|
||
|
|
-Dsonar.projectName=${{ github.repository }}
|
||
|
|
-Dsonar.sources=.
|