mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '3.1.x' into 3.2.x
Closes gh-40444
This commit is contained in:
commit
0ce2a80c81
29
.github/actions/build/action.yml
vendored
29
.github/actions/build/action.yml
vendored
@ -32,32 +32,11 @@ outputs:
|
|||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: Set Up Java
|
- name: Prepare Gradle Build
|
||||||
uses: actions/setup-java@v4
|
uses: ./.github/actions/prepare-gradle-build
|
||||||
with:
|
with:
|
||||||
distribution: 'liberica'
|
java-version: ${{ inputs.java-version }}
|
||||||
java-version: |
|
java-toolchain: ${{ inputs.java-toolchain }}
|
||||||
${{ inputs.java-version }}
|
|
||||||
${{ inputs.java-toolchain && '17' || '' }}
|
|
||||||
- name: Set Up Gradle
|
|
||||||
uses: gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 #v3.3.0
|
|
||||||
with:
|
|
||||||
cache-read-only: false
|
|
||||||
- name: Configure Gradle Properties
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p $HOME/.gradle
|
|
||||||
echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties
|
|
||||||
echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties
|
|
||||||
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
|
|
||||||
- name: Configure Toolchain Properties
|
|
||||||
if: ${{ inputs.java-toolchain }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo toolchainVersion=${{ inputs.java-version }} >> $HOME/.gradle/gradle.properties
|
|
||||||
echo systemProp.org.gradle.java.installations.auto-detect=false >> $HOME/.gradle/gradle.properties
|
|
||||||
echo systemProp.org.gradle.java.installations.auto-download=false >> $HOME/.gradle/gradle.properties
|
|
||||||
echo systemProp.org.gradle.java.installations.paths=${{ format('$JAVA_HOME_{0}_X64', inputs.java-version) }} >> $HOME/.gradle/gradle.properties
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: build
|
id: build
|
||||||
if: ${{ !inputs.publish }}
|
if: ${{ !inputs.publish }}
|
||||||
|
40
.github/actions/prepare-gradle-build/action.yml
vendored
Normal file
40
.github/actions/prepare-gradle-build/action.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: 'Prepare Gradle Build'
|
||||||
|
description: 'Prepares a Gradle build. Sets up Java and Gradle and configures Gradle properties'
|
||||||
|
inputs:
|
||||||
|
java-version:
|
||||||
|
required: false
|
||||||
|
default: '17'
|
||||||
|
description: 'The Java version to use for the build'
|
||||||
|
java-toolchain:
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
description: 'Whether a Java toolchain should be used'
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Set Up Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
distribution: 'liberica'
|
||||||
|
java-version: |
|
||||||
|
${{ inputs.java-version }}
|
||||||
|
${{ inputs.java-toolchain && '17' || '' }}
|
||||||
|
- name: Set Up Gradle
|
||||||
|
uses: gradle/actions/setup-gradle@6cec5d49d4d6d4bb982fbed7047db31ea6d38f11 #v3.3.0
|
||||||
|
with:
|
||||||
|
cache-read-only: false
|
||||||
|
- name: Configure Gradle Properties
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p $HOME/.gradle
|
||||||
|
echo 'systemProp.user.name=spring-builds+github' >> $HOME/.gradle/gradle.properties
|
||||||
|
echo 'systemProp.org.gradle.internal.launcher.welcomeMessageEnabled=false' >> $HOME/.gradle/gradle.properties
|
||||||
|
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
|
||||||
|
- name: Configure Toolchain Properties
|
||||||
|
if: ${{ inputs.java-toolchain }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo toolchainVersion=${{ inputs.java-version }} >> $HOME/.gradle/gradle.properties
|
||||||
|
echo systemProp.org.gradle.java.installations.auto-detect=false >> $HOME/.gradle/gradle.properties
|
||||||
|
echo systemProp.org.gradle.java.installations.auto-download=false >> $HOME/.gradle/gradle.properties
|
||||||
|
echo systemProp.org.gradle.java.installations.paths=${{ format('$JAVA_HOME_{0}_X64', inputs.java-version) }} >> $HOME/.gradle/gradle.properties
|
Loading…
Reference in New Issue
Block a user