Skip to content

Commit

Permalink
Add build-pull-request.yml reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sjohnr committed May 22, 2024
1 parent ea8bf07 commit 5924798
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Pull Request

on:
workflow_call:
inputs:
java-version:
description: Version of the JDK to use to run the Gradle command.
required: false
default: '17'
type: string
distribution:
description: Distribution of the JDK to use to run the Gradle command.
required: false
default: 'temurin'
type: string
secrets:
GRADLE_ENTERPRISE_CACHE_USER:
required: false
GRADLE_ENTERPRISE_CACHE_PASSWORD:
required: false
GRADLE_ENTERPRISE_SECRET_ACCESS_KEY:
required: false
DEVELOCITY_ACCESS_KEY:
required: false

env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ inputs.java-version }}
uses: spring-io/spring-gradle-build-action@v2
with:
java-version: ${{ inputs.java-version }}
distribution: ${{ inputs.distribution }}
- name: Build with Gradle
run: ./gradlew clean build --continue

0 comments on commit 5924798

Please sign in to comment.