forked from webpwnized/mutillidae
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
86274d1
commit e644882
Showing
2 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: SonarQube Analysis | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
sonarqube: | ||
name: SonarQube Scan | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 11 (Required for SonarQube) | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '11' | ||
|
||
- name: Install SonarQube Scanner | ||
run: | | ||
wget https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-6.2.0.4578-linux.zip | ||
unzip sonar-scanner-cli-6.2.0.4578-linux.zip -d $HOME | ||
export PATH="$HOME/sonar-scanner-6.2.0.4578-linux/bin:$PATH" | ||
- name: Run SonarQube Scanner | ||
env: | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }} | ||
run: | | ||
sonar-scanner \ | ||
-Dsonar.projectKey=mutillidae \ | ||
-Dsonar.sources=. \ | ||
-Dsonar.host.url=$SONAR_HOST_URL \ | ||
-Dsonar.login=$SONAR_TOKEN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters