-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 960 Bytes
/
java.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
44
45
46
47
name: Java
on:
push:
branches: [ "main" ]
paths:
- .github/workflows/java.yml
- java/**
pull_request:
branches: [ "main" ]
paths:
- .github/workflows/java.yml
- java/**
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Java
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-java-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-java
- name: Build
uses: gradle/gradle-build-action@04b20c065cf1ab708c96e64a8811018d0a1fbc88
with:
arguments: build
build-root-directory: java