This commit is contained in:
parent
a43d377930
commit
cacc18f7eb
1 changed files with 21 additions and 0 deletions
21
.forgejo/workflows/sonarqube-scan.yml
Normal file
21
.forgejo/workflows/sonarqube-scan.yml
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
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=.
|
||||||
Loading…
Add table
Reference in a new issue