-
Notifications
You must be signed in to change notification settings - Fork 47
35 lines (29 loc) · 1.23 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Build, Deploy, and Analyze
on:
push:
branches:
- '**'
pull_request:
branches:
- master
workflow_dispatch: # Allow for manual trigger via GitHub UI
jobs:
# Call the Java and Maven setup workflow
java-maven-setup:
uses: ./.github/workflows/setup-java-maven.yml # Reference to the consolidated Java and Maven setup workflow
# Call the build and artifact workflow
build-and-artifact:
uses: ./.github/workflows/build-and-artifact.yml # Reference to the build workflow
needs: java-maven-setup # Ensure Java and Maven setup is completed first
# Call the Spring Boot run and stop workflow
springboot-run-stop:
uses: ./.github/workflows/springboot-run-stop.yml # Reference to the Spring Boot workflow
needs: build-and-artifact # Ensure the build is completed before running Spring Boot
# Call the SonarCloud analysis workflow
sonarcloud-analysis:
uses: ./.github/workflows/sonarcloud-analysis.yml # Reference to the SonarCloud analysis workflow
needs: build-and-artifact # Ensure the build job is completed before analysis
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORG: ${{ secrets.SONAR_ORG }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}