diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 1c18d5c0299..b45040d0348 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -16,6 +16,10 @@ inputs: develocity-access-key: description: 'Access key for authentication with ge.spring.io' required: false + gradle-cache-read-only: + description: 'Whether Gradle''s cache should be read only' + required: false + default: 'true' java-distribution: description: 'Java distribution to use' required: false @@ -49,6 +53,7 @@ runs: - name: Prepare Gradle Build uses: ./.github/actions/prepare-gradle-build with: + cache-read-only: ${{ inputs.gradle-cache-read-only }} develocity-access-key: ${{ inputs.develocity-access-key }} java-distribution: ${{ inputs.java-distribution }} java-early-access: ${{ inputs.java-early-access }} diff --git a/.github/actions/prepare-gradle-build/action.yml b/.github/actions/prepare-gradle-build/action.yml index 50bfd012cdc..ee322ad14ff 100644 --- a/.github/actions/prepare-gradle-build/action.yml +++ b/.github/actions/prepare-gradle-build/action.yml @@ -1,6 +1,10 @@ name: Prepare Gradle Build description: 'Prepares a Gradle build. Sets up Java and Gradle and configures Gradle properties' inputs: + cache-read-only: + description: 'Whether Gradle''s cache should be read only' + required: false + default: 'true' develocity-access-key: description: 'Access key for authentication with ge.spring.io' required: false @@ -38,7 +42,7 @@ runs: - name: Set Up Gradle uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 with: - cache-read-only: false + cache-read-only: ${{ inputs.cache-read-only }} develocity-access-key: ${{ inputs.develocity-access-key }} - name: Configure Gradle Properties shell: bash diff --git a/.github/workflows/build-and-deploy-snapshot.yml b/.github/workflows/build-and-deploy-snapshot.yml index 03b6453995f..7ad01cf6c6a 100644 --- a/.github/workflows/build-and-deploy-snapshot.yml +++ b/.github/workflows/build-and-deploy-snapshot.yml @@ -22,6 +22,7 @@ jobs: commercial-repository-username: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_USERNAME }} commercial-snapshot-repository-url: ${{ vars.COMMERCIAL_SNAPSHOT_REPO_URL }} develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + gradle-cache-read-only: false publish: true - name: Deploy uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 diff --git a/.github/workflows/build-pull-request.yml b/.github/workflows/build-pull-request.yml index b0131d1362b..7a28e943cf5 100644 --- a/.github/workflows/build-pull-request.yml +++ b/.github/workflows/build-pull-request.yml @@ -8,27 +8,11 @@ jobs: if: ${{ github.repository == 'spring-projects/spring-boot' }} runs-on: ${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} steps: - - name: Free Disk Space - uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 - with: - docker-images: false - large-packages: false - - name: Set Up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'liberica' - java-version: '17' - - name: Check Out + - name: Check Out Code uses: actions/checkout@v4 - - name: Validate Gradle Wrapper - uses: gradle/actions/wrapper-validation@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - - name: Set Up Gradle - uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 # v4.1.0 - name: Build - env: - CI: 'true' - GRADLE_ENTERPRISE_URL: 'https://ge.spring.io' - run: ./gradlew -Dorg.gradle.internal.launcher.welcomeMessageEnabled=false --no-daemon --no-parallel --continue build + id: build + uses: ./.github/actions/build - name: Print JVM Thread Dumps When Cancelled if: cancelled() uses: ./.github/actions/print-jvm-thread-dumps diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 216508ab597..65a812a9ed8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,7 @@ jobs: commercial-repository-username: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_USERNAME }} commercial-snapshot-repository-url: ${{ vars.COMMERCIAL_SNAPSHOT_REPO_URL }} develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + gradle-cache-read-only: false java-early-access: ${{ matrix.java.early-access || 'false' }} java-distribution: ${{ matrix.java.distribution }} java-toolchain: ${{ matrix.java.toolchain }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf4117737b6..a2e6d102176 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,7 @@ jobs: commercial-repository-username: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_USERNAME }} commercial-snapshot-repository-url: ${{ vars.COMMERCIAL_SNAPSHOT_REPO_URL }} develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + gradle-cache-read-only: false publish: true - name: Stage Release uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1