manage verify workflow
[reguloj.git] / .github / workflows / verify.yml
blobed51a44b0748aaed1efefe818320c46d6d321a27
1 # SPDX-FileCopyrightText: The reguloj Authors
2 # SPDX-License-Identifier: 0BSD
4 name: Verify Commits
5 on:
6   pull_request:
7     branches: [ main ]
8     paths:
9       - .github/workflows/verify.yml
10       - pom.xml
11       - src/**
12   push:
13     branches: [ main ]
14     paths:
15       - .github/workflows/verify.yml
16       - pom.xml
17       - src/**
18 jobs:
19   verify:
20     runs-on: ubuntu-latest
21     steps:
22       - name: Clone Git Repository
23         uses: actions/checkout@v3
24       - name: Set up Java
25         uses: actions/setup-java@v3
26         with:
27           java-version: 17
28           java-package: jdk
29           architecture: x64
30           distribution: temurin
31       - name: Cache Dependencies
32         uses: actions/cache@v3
33         with:
34           path: ~/.m2/repository
35           key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
36           restore-keys: |
37             ${{ runner.os }}-maven-
38       - name: Build with Maven
39         run: mvn --batch-mode verify