| 1 |
# |
| 2 |
# Copyright 2022 The Sigstore Authors. |
| 3 |
# |
| 4 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 |
# you may not use this file except in compliance with the License. |
| 6 |
# You may obtain a copy of the License at |
| 7 |
# |
| 8 |
# http://www.apache.org/licenses/LICENSE-2.0 |
| 9 |
# |
| 10 |
# Unless required by applicable law or agreed to in writing, software |
| 11 |
# distributed under the License is distributed on an "AS IS" BASIS, |
| 12 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 |
# See the License for the specific language governing permissions and |
| 14 |
# limitations under the License. |
| 15 |
|
| 16 |
name: Check java build |
| 17 |
|
| 18 |
permissions: |
| 19 |
contents: read |
| 20 |
|
| 21 |
on: |
| 22 |
workflow_call: # allow this workflow to be called by other workflows |
| 23 |
push: |
| 24 |
branches: [main] |
| 25 |
pull_request: {} |
| 26 |
|
| 27 |
jobs: |
| 28 |
build: |
| 29 |
name: Build Java |
| 30 |
runs-on: ubuntu-latest |
| 31 |
|
| 32 |
steps: |
| 33 |
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 34 |
with: |
| 35 |
persist-credentials: false |
| 36 |
- name: Set up JDK 25 |
| 37 |
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 |
| 38 |
with: |
| 39 |
java-version: 25 |
| 40 |
distribution: 'temurin' |
| 41 |
- name: Setup Gradle |
| 42 |
uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e # v6.1.0 |
| 43 |
|
| 44 |
# make sure jar generation works and tests/checks pass |
| 45 |
- name: Test |
| 46 |
working-directory: java |
| 47 |
run: ./gradlew build |