-
-
Notifications
You must be signed in to change notification settings - Fork 2
33 lines (27 loc) · 1021 Bytes
/
check-license.yaml
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
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: License Check
on:
push:
pull_request:
env:
RUNTIME_VERSION: 17
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: "${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}"
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: "Setup JDK ${{ env.RUNTIME_VERSION }}"
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: "${{ env.RUNTIME_VERSION }}"
# Actually build
- name: Run Gradle Build
uses: gradle/gradle-build-action@v2
with:
cache-read-only: "${{ !startsWith(github.ref, 'refs/heads/master') || github.event_name == 'pull_request' }}"
arguments: checkLicenses