name: PR Build

on:
  pull_request:
    branches: [ main ]

jobs:
  build:
    name: Build project
    runs-on: ubuntu-latest

    steps:

    - name: Check out sources
      uses: actions/checkout@v3

    - name: Set up JDK 17
      uses: actions/setup-java@v3
      with:
        distribution: 'temurin'
        java-version: 17
        cache: 'maven'

    - name: Build with Maven
      run: ./mvnw -B
