-
Notifications
You must be signed in to change notification settings - Fork 7
38 lines (35 loc) · 965 Bytes
/
main.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
name: Java CI with Gradle
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
strategy:
matrix:
jdk: [ 11, 17 ]
runs-on: ubuntu-latest
steps:
- name: Pull Request Checkout
uses: actions/checkout@v3
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
if: github.head_ref != ''
- name: Push Checkout
uses: actions/checkout@v3
if: github.head_ref == ''
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{matrix.jdk}}
- name: Github Environment Setup
run: |
owner=${{ github.repository_owner }}
echo "REPO_SITE=${owner}" >> $GITHUB_ENV
- name: Build with Gradle
run: ./gradlew build --warning-mode all