-
-
Notifications
You must be signed in to change notification settings - Fork 179
43 lines (37 loc) · 1.03 KB
/
build-prs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Build and test PRs
on:
pull_request:
types:
- synchronize
- opened
- ready_for_review
- reopened
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true
# GradleUtils will append the branch name to the version,
# but for that we need a properly checked out branch
- name: Create branch for commit
run:
git switch -C pr-${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.ref }}
- name: Setup JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'
- name: Setup with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: setup
cache-read-only: false
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
cache-read-only: false