Skip to content

Java Build

Java Build #116

Workflow file for this run

name: Java Build
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
- reopened
schedule:
- cron: '20 5 * * 1'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 8, 11, 17, 20 ]
fail-fast: false
steps:
- name: Checkout project
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Cache Maven packages
uses: actions/cache@v1
with:
path: ~/.m2
key: ${{ runner.os }}-m2-java${{ matrix.java-version }}-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
uses: nick-fields/retry@v2
with:
timeout_seconds: 60
max_attempts: 5
command: mvn -B clean package --file pom.xml
env:
BETTER_STACK_SOURCE_TOKEN: ${{ secrets.BETTER_STACK_SOURCE_TOKEN }}