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 : Development
1+ name : Development Build
22
33on :
44 push :
Original file line number Diff line number Diff line change 1+ name : Main Build
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+
7+ jobs :
8+ build :
9+
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Create mongo Docker container
14+ id : build_mongo_docker
15+ uses : DigiPie/mongo-action@v2.0.1
16+ with :
17+ image_version : latest
18+ port : 27017
19+ - uses : actions/checkout@v4
20+ with :
21+ fetch-depth : 0
22+ ref : main
23+
24+ - name : Set up JDK 21
25+ uses : actions/setup-java@v4
26+ with :
27+ distribution : ' adopt'
28+ java-version : ' 21'
29+ - name : Cache Maven repository
30+ uses : actions/cache@v4
31+ with :
32+ path : .m2/repository # maven repository files are stored here
33+ key : ${{ runner.OS }}-maven-${{ hashFiles('pom.xml') }}
34+ - name : Build
35+ run : mvn -B package --file pom.xml
36+ - uses : actions/upload-artifact@v4
37+ # Test run screenshots only on failure
38+ if : success()
39+ with :
40+ name : ide-services-runner.jar
41+ path : target/ide-services-runner.jar
Original file line number Diff line number Diff line change 11name : Release
22
33on :
4- push :
5- branches : [ main ]
4+ workflow_dispatch :
5+ inputs :
6+ branch :
7+ description : The branch to release in test
8+ required : false
9+ default : Development
10+ type : choice
11+ options :
12+ - Development
13+ - main
614
715jobs :
816 build :
1927 - uses : actions/checkout@v4
2028 with :
2129 fetch-depth : 0
22- ref : main
23-
30+ ref : ${{inputs.branch}}
2431 - name : Set up JDK 21
2532 uses : actions/setup-java@v4
2633 with :
3138 with :
3239 path : .m2/repository # maven repository files are stored here
3340 key : ${{ runner.OS }}-maven-${{ hashFiles('pom.xml') }}
34- - name : Install
35- run : |
36- git config user.name "GitHub Actions"
37- git config user.email noreply@github.com
38- git merge origin/Development
3941 - name : Build
4042 run : mvn -B package --file pom.xml
4143 - uses : actions/upload-artifact@v4
4446 with :
4547 name : ide-services-runner.jar
4648 path : target/ide-services-runner.jar
47- - name : Push
48- run : |
49- git commit -a -m "New release" --allow-empty
50- git push
5149 - name : Deploy to test
5250 uses : appleboy/scp-action@master
5351 with :
You can’t perform that action at this time.
0 commit comments