Skip to content

Commit c32b768

Browse files
Add parallel build GitHub Actions workflow with build status badge (#12)
1 parent 4188d5a commit c32b768

File tree

2 files changed

+158
-0
lines changed

2 files changed

+158
-0
lines changed

.github/workflows/build.yml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
7+
jobs:
8+
build-01-hellodemo:
9+
name: "Project 01: Hello Demo"
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up JDK 25
16+
uses: actions/setup-java@v4
17+
with:
18+
java-version: '25'
19+
distribution: 'temurin'
20+
cache: 'maven'
21+
22+
- name: Build project
23+
run: |
24+
set -e
25+
echo "Building Project 01: Hello Demo"
26+
cd 01-hellodemo
27+
mvn clean compile -B -q || {
28+
echo "Failed to compile 01-hellodemo"
29+
exit 1
30+
}
31+
echo "Project 01 completed successfully"
32+
33+
build-02-local:
34+
name: "Project 02: Spring MVC CRUD Local"
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Set up JDK 25
41+
uses: actions/setup-java@v4
42+
with:
43+
java-version: '25'
44+
distribution: 'temurin'
45+
cache: 'maven'
46+
47+
- name: Build project
48+
run: |
49+
set -e
50+
echo "Building Project 02: Spring MVC CRUD Local"
51+
cd 02-spring-boot-spring-mvc-crud-local
52+
mvn clean compile -B -q || {
53+
echo "Failed to compile 02-spring-boot-spring-mvc-crud-local"
54+
exit 1
55+
}
56+
echo "Project 02 completed successfully"
57+
58+
build-03-application-profiles:
59+
name: "Project 03: AWS Application Profiles"
60+
runs-on: ubuntu-latest
61+
62+
steps:
63+
- uses: actions/checkout@v4
64+
65+
- name: Set up JDK 25
66+
uses: actions/setup-java@v4
67+
with:
68+
java-version: '25'
69+
distribution: 'temurin'
70+
cache: 'maven'
71+
72+
- name: Build project
73+
run: |
74+
set -e
75+
echo "Building Project 03: AWS Application Profiles"
76+
cd 03-spring-boot-spring-mvc-crud-aws-application-profiles
77+
mvn clean compile -B -q || {
78+
echo "Failed to compile 03-spring-boot-spring-mvc-crud-aws-application-profiles"
79+
exit 1
80+
}
81+
echo "Project 03 completed successfully"
82+
83+
build-04-environment-variables:
84+
name: "Project 04: AWS Environment Variables"
85+
runs-on: ubuntu-latest
86+
87+
steps:
88+
- uses: actions/checkout@v4
89+
90+
- name: Set up JDK 25
91+
uses: actions/setup-java@v4
92+
with:
93+
java-version: '25'
94+
distribution: 'temurin'
95+
cache: 'maven'
96+
97+
- name: Build project
98+
run: |
99+
set -e
100+
echo "Building Project 04: AWS Environment Variables"
101+
cd 04-spring-boot-spring-mvc-crud-aws-environment-variables
102+
mvn clean compile -B -q || {
103+
echo "Failed to compile 04-spring-boot-spring-mvc-crud-aws-environment-variables"
104+
exit 1
105+
}
106+
echo "Project 04 completed successfully"
107+
108+
build-05-encrypted:
109+
name: "Project 05: AWS Environment Variables Encrypted"
110+
runs-on: ubuntu-latest
111+
112+
steps:
113+
- uses: actions/checkout@v4
114+
115+
- name: Set up JDK 25
116+
uses: actions/setup-java@v4
117+
with:
118+
java-version: '25'
119+
distribution: 'temurin'
120+
cache: 'maven'
121+
122+
- name: Build project
123+
run: |
124+
set -e
125+
echo "Building Project 05: AWS Environment Variables Encrypted"
126+
cd 05-spring-boot-spring-mvc-crud-aws-environment-variables-encrypted
127+
mvn clean compile -B -q || {
128+
echo "Failed to compile 05-spring-boot-spring-mvc-crud-aws-environment-variables-encrypted"
129+
exit 1
130+
}
131+
echo "Project 05 completed successfully"
132+
133+
build-06-bonus-data-refresher:
134+
name: "Project 06: Bonus - Data Refresher"
135+
runs-on: ubuntu-latest
136+
137+
steps:
138+
- uses: actions/checkout@v4
139+
140+
- name: Set up JDK 25
141+
uses: actions/setup-java@v4
142+
with:
143+
java-version: '25'
144+
distribution: 'temurin'
145+
cache: 'maven'
146+
147+
- name: Build project
148+
run: |
149+
set -e
150+
echo "Building Project 06: Bonus - Data Refresher"
151+
cd 06-bonus-spring-boot-spring-mvc-crud-aws-environment-variables-encrypted-with-data-refresher
152+
mvn clean compile -B -q || {
153+
echo "Failed to compile 06-bonus-spring-boot-spring-mvc-crud-aws-environment-variables-encrypted-with-data-refresher"
154+
exit 1
155+
}
156+
echo "Project 06 completed successfully"

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Deploy Spring Boot 4 Java Apps Online to Amazon Cloud (AWS)
22

3+
![Build Status](https://github.com/darbyluv2code/deploy-spring-boot-apps-on-aws/actions/workflows/build.yml/badge.svg)
4+
35
Source code for the course: [Deploy Spring Boot 4 Java Apps Online to Amazon Cloud (AWS)](http://www.luv2code.com/deploy-spring-boot-3-github)
46

57
If you have questions or need tech support, post your questions to the [classroom discussion forum](https://www.udemy.com/course/deploy-java-spring-apps-online/learn/v4/questions).

0 commit comments

Comments
 (0)