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+ # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
2+ # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
3+
4+ name : Java CI with Maven on Push
5+
6+ on :
7+ push :
8+ branches : ["main"]
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@v3
15+ - name : Set up JDK 25
16+ uses : actions/setup-java@v5
17+ with :
18+ java-version : " 25"
19+ distribution : " temurin"
20+ cache : maven
21+ - name : Build with Maven
22+ run : mvn -B verify --file pom.xml
23+ - name : Scan with Sonar
24+ run : mvn org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=BerryCloud_xapi-java -Dsonar.organization=berrycloud --file pom.xml
25+ env :
26+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
27+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
28+
29+ # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
30+ - name : Update dependency graph
31+ uses : advanced-security/maven-dependency-submission-action@v5
You can’t perform that action at this time.
0 commit comments