Skip to content

Commit 22ebd6e

Browse files
committed
Use jdk 8 to deploy docs if configuration contains jdk 8
1 parent 201c699 commit 22ebd6e

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,15 @@ jobs:
132132
133133
echo " JDK versions: $JDK_VERSIONS"
134134
135+
# Check if JDK 8 is in the configuration for this branch
136+
HAS_JDK8=false
137+
if echo "$JDK_VERSIONS" | grep -q "^8$"; then
138+
HAS_JDK8=true
139+
fi
140+
echo " Has JDK 8: $HAS_JDK8"
141+
135142
for VERSION in $JDK_VERSIONS; do
136-
MATRIX_ENTRIES+=("{\"branch\":\"$BRANCH\",\"java-version\":\"$VERSION\"}")
143+
MATRIX_ENTRIES+=("{\"branch\":\"$BRANCH\",\"java-version\":\"$VERSION\",\"has-jdk8\":$HAS_JDK8}")
137144
done
138145
done
139146
@@ -218,7 +225,9 @@ jobs:
218225
chmod +x /tmp/custom-build.sh
219226
bash /tmp/custom-build.sh
220227
else
221-
if [[ "${{ matrix.java-version }}" == "17" ]]; then
228+
# If branch config contains JDK 8, use docs profile with JDK 8
229+
# Otherwise, use docs profile with JDK 17
230+
if [[ ("${{ matrix.has-jdk8 }}" == "true" && "${{ matrix.java-version }}" == "8") ]] || [[ ("${{ matrix.has-jdk8 }}" == "false" && "${{ matrix.java-version }}" == "17") ]]; then
222231
./mvnw clean deploy -Pdocs,deploy,spring -B -U
223232
else
224233
./mvnw clean deploy -Pdeploy,spring -B -U

0 commit comments

Comments
 (0)