Skip to content

Commit 5924798

Browse files
committed
Add build-pull-request.yml reusable workflow
1 parent ea8bf07 commit 5924798

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build Pull Request
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
java-version:
7+
description: Version of the JDK to use to run the Gradle command.
8+
required: false
9+
default: '17'
10+
type: string
11+
distribution:
12+
description: Distribution of the JDK to use to run the Gradle command.
13+
required: false
14+
default: 'temurin'
15+
type: string
16+
secrets:
17+
GRADLE_ENTERPRISE_CACHE_USER:
18+
required: false
19+
GRADLE_ENTERPRISE_CACHE_PASSWORD:
20+
required: false
21+
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY:
22+
required: false
23+
DEVELOCITY_ACCESS_KEY:
24+
required: false
25+
26+
env:
27+
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
28+
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
29+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
30+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
31+
32+
jobs:
33+
build:
34+
name: Build
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- name: Set up JDK ${{ inputs.java-version }}
39+
uses: spring-io/spring-gradle-build-action@v2
40+
with:
41+
java-version: ${{ inputs.java-version }}
42+
distribution: ${{ inputs.distribution }}
43+
- name: Build with Gradle
44+
run: ./gradlew clean build --continue

0 commit comments

Comments
 (0)