Skip to content

Commit df33bf2

Browse files
committed
Sync GHA setup
1 parent f75cebd commit df33bf2

File tree

9 files changed

+41
-26
lines changed

9 files changed

+41
-26
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Await HTTP Resource
2+
description: Waits for an HTTP resource to be available (a HEAD request succeeds)
3+
inputs:
4+
url:
5+
description: 'The URL of the resource to await'
6+
required: true
7+
runs:
8+
using: composite
9+
steps:
10+
- name: Await HTTP resource
11+
shell: bash
12+
run: |
13+
url=${{ inputs.url }}
14+
echo "Waiting for $url"
15+
until curl --fail --head --silent ${{ inputs.url }} > /dev/null
16+
do
17+
echo "."
18+
sleep 60
19+
done
20+
echo "$url is available"

.github/actions/build/action.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ inputs:
55
required: false
66
default: '8'
77
description: 'The Java version to compile and test with'
8-
java-distribution:
8+
java-early-access:
99
required: false
10-
default: 'liberica'
11-
description: 'The Java distribution to use for the build'
10+
default: 'false'
11+
description: 'Whether the Java version is in early access'
1212
java-toolchain:
1313
required: false
1414
default: 'false'
@@ -35,7 +35,7 @@ runs:
3535
with:
3636
develocity-access-key: ${{ inputs.develocity-access-key }}
3737
java-version: ${{ inputs.java-version }}
38-
java-distribution: ${{ inputs.java-distribution }}
38+
java-early-access: ${{ inputs.java-early-access }}
3939
java-toolchain: ${{ inputs.java-toolchain }}
4040
- name: Build
4141
id: build

.github/actions/create-github-release/action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Create GitHub Release
22
description: Create the release on GitHub with a changelog
33
inputs:
44
milestone:
5-
description: 'Name of the GitHub milestone for which a release will be created'
5+
description: Name of the GitHub milestone for which a release will be created
66
required: true
77
token:
8-
description: 'Token to use for authentication with GitHub'
8+
description: Token to use for authentication with GitHub
99
required: true
1010
runs:
1111
using: composite

.github/actions/prepare-gradle-build/action.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ inputs:
55
required: false
66
default: '8'
77
description: 'The Java version to use for the build'
8-
java-distribution:
8+
java-early-access:
99
required: false
10-
default: 'liberica'
11-
description: 'The Java distribution to use for the build'
10+
default: 'false'
11+
description: 'Whether the Java version is in early access'
1212
java-toolchain:
1313
required: false
1414
default: 'false'
@@ -22,12 +22,12 @@ runs:
2222
- name: Set Up Java
2323
uses: actions/setup-java@v4
2424
with:
25-
distribution: ${{ inputs.java-distribution }}
25+
distribution: ${{ inputs.java-early-access == 'true' && 'temurin' || 'liberica' }}
2626
java-version: |
27-
${{ inputs.java-version }}
27+
${{ inputs.java-early-access == 'true' && format('{0}-ea', inputs.java-version) || inputs.java-version }}
2828
${{ inputs.java-toolchain == 'true' && '8' || '' }}
2929
- name: Set Up Gradle
30-
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
30+
uses: gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
3131
with:
3232
cache-read-only: false
3333
develocity-access-key: ${{ inputs.develocity-access-key }}

.github/actions/sync-to-maven-central/action.yml

+4-11
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ runs:
2020
using: composite
2121
steps:
2222
- name: Set Up JFrog CLI
23-
uses: jfrog/setup-jfrog-cli@7c95feb32008765e1b4e626b078dfd897c4340ad # v4.1.2
23+
uses: jfrog/setup-jfrog-cli@105617d23456a69a92485207c4f28ae12297581d # v4.2.1
2424
env:
2525
JF_ENV_SPRING: ${{ inputs.jfrog-cli-config-token }}
2626
- name: Download Release Artifacts
@@ -38,13 +38,6 @@ runs:
3838
release: true
3939
generate-checksums: true
4040
- name: Await
41-
shell: bash
42-
run: |
43-
url=${{ format('https://repo.maven.apache.org/maven2/org/springframework/spring-context/{0}/spring-context-{0}.jar', inputs.spring-framework-version) }}
44-
echo "Waiting for $url"
45-
until curl --fail --head --silent $url > /dev/null
46-
do
47-
echo "."
48-
sleep 60
49-
done
50-
echo "$url is available"
41+
uses: ./.github/actions/await-http-resource
42+
with:
43+
url: ${{ format('https://repo.maven.apache.org/maven2/org/springframework/spring-context/{0}/spring-context-{0}.jar', inputs.spring-framework-version) }}

.github/workflows/build-and-deploy-snapshot.yml

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
build-and-deploy-snapshot:
1010
name: Build and Deploy Snapshot
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 60
1213
if: ${{ github.repository == 'spring-projects/spring-framework' }}
1314
steps:
1415
- name: Check Out Code

.github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
ci:
1010
name: '${{ matrix.os.name}} | Java ${{ matrix.java.version}}'
1111
runs-on: ${{ matrix.os.id }}
12+
timeout-minutes: 60
1213
if: ${{ github.repository == 'spring-projects/spring-framework' }}
1314
strategy:
1415
matrix:
@@ -41,7 +42,7 @@ jobs:
4142
uses: ./.github/actions/build
4243
with:
4344
java-version: ${{ matrix.java.version }}
44-
java-distribution: ${{ matrix.java.distribution || 'liberica' }}
45+
java-early-access: ${{ matrix.java.early-access || 'false' }}
4546
java-toolchain: ${{ matrix.java.toolchain }}
4647
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
4748
- name: Send Notification

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
runs-on: ubuntu-latest
7575
steps:
7676
- name: Set up JFrog CLI
77-
uses: jfrog/setup-jfrog-cli@7c95feb32008765e1b4e626b078dfd897c4340ad # v4.1.2
77+
uses: jfrog/setup-jfrog-cli@105617d23456a69a92485207c4f28ae12297581d # v4.2.1
7878
env:
7979
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
8080
- name: Promote build

.github/workflows/validate-gradle-wrapper.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: gradle/actions/wrapper-validation@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2
11+
- uses: gradle/actions/wrapper-validation@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0

0 commit comments

Comments
 (0)