File tree 1 file changed +38
-0
lines changed
1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+
9
+ jobs :
10
+ build :
11
+ name : Build
12
+ runs-on : ubuntu-latest
13
+ permissions : read-all
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+ with :
17
+ fetch-depth : 0 # Shallow clones should be disabled for a better relevancy of analysis
18
+ - name : Set up JDK 17
19
+ uses : actions/setup-java@v1
20
+ with :
21
+ java-version : 17
22
+ - name : Cache SonarQube packages
23
+ uses : actions/cache@v1
24
+ with :
25
+ path : ~/.sonar/cache
26
+ key : ${{ runner.os }}-sonar
27
+ restore-keys : ${{ runner.os }}-sonar
28
+ - name : Cache Maven packages
29
+ uses : actions/cache@v1
30
+ with :
31
+ path : ~/.m2
32
+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
33
+ restore-keys : ${{ runner.os }}-m2
34
+ - name : Build and analyze
35
+ env :
36
+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
37
+ SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
38
+ run : mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=JavaVulnerableLab -Dsonar.projectName='JavaVulnerableLab'
You can’t perform that action at this time.
0 commit comments