Build project with Maven #1114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build project with Maven | |
on: | |
pull_request: | |
push: | |
schedule: | |
- cron: '2 2 * * 1-5' # run nightly master builds on weekdays | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
services: | |
keycloak: | |
image: quay.io/keycloak/keycloak:19.0.3-legacy | |
env: | |
KEYCLOAK_USER: keycloak | |
KEYCLOAK_PASSWORD: keycloak1! | |
DB_VENDOR: h2 | |
ports: [ 8443/tcp ] | |
options: --health-cmd "curl -Iks https://localhost:8443" --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@f1d3225b5376a0791fdee5a0e8eac5289355e43a # pin@v2 | |
- name: Java setup | |
uses: actions/setup-java@e54a62b3df9364d4b4c1c29c7225e57fe605d7dd # pin@v1 | |
with: | |
java-version: 1.8 | |
- name: Cache | |
uses: actions/cache@0781355a23dac32fd3bac414512f4b903437991a # pin@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Run Maven | |
env: | |
KEYCLOAK_URL: https://localhost:${{ job.services.keycloak.ports[8443] }}/auth | |
run: mvn -B clean install com.mycila:license-maven-plugin:check |