File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 and analyze
12+ runs-on : ubuntu-latest
13+
14+ steps :
15+ - uses : actions/checkout@v4
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@v4
20+ with :
21+ java-version : 17
22+ distribution : ' zulu' # Alternative distribution options are available.
23+ - name : Cache SonarQube packages
24+ uses : actions/cache@v4
25+ with :
26+ path : ~/.sonar/cache
27+ key : ${{ runner.os }}-sonar
28+ restore-keys : ${{ runner.os }}-sonar
29+ - name : Cache Maven packages
30+ uses : actions/cache@v4
31+ with :
32+ path : ~/.m2
33+ key : ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
34+ restore-keys : ${{ runner.os }}-m2
35+ - name : Build and analyze
36+ env :
37+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
38+ SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
39+ run : mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apponix-java -Dsonar.projectName='apponix-java'
You can’t perform that action at this time.
0 commit comments