2021-06-01 14:11:08 +08:00
|
|
|
name: Build Backend
|
|
|
|
|
|
|
|
on:
|
|
|
|
# allow manual dispatch
|
|
|
|
workflow_dispatch:
|
|
|
|
# run on PRs
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- 'frontend/**'
|
|
|
|
|
|
|
|
concurrency:
|
2021-12-04 01:18:21 +08:00
|
|
|
group: '${{ github.ref }}-backend-build'
|
2021-06-01 14:11:08 +08:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Set up JDK
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
|
|
|
|
- name: Cache Maven Deps
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: $GITHUB_WORKSPACE/.m2/repository
|
|
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-maven-
|
|
|
|
|
|
|
|
- name: Build backend
|
|
|
|
run: mvn --batch-mode --errors --fail-at-end --show-version --no-transfer-progress -Dmaven.repo.local=$GITHUB_WORKSPACE/.m2/repository install
|