forked from Chillimport/ChillImport
-
Notifications
You must be signed in to change notification settings - Fork 4
45 lines (38 loc) · 1.05 KB
/
maven-build-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Maven Pull Request Build
on:
pull_request:
branches:
- "*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache maven repository
uses: actions/cache@v2
with:
path: |
~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
- name: Checkout Source
uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: |
export GIT_COMMIT_SHA=${GITHUB_SHA}
mvn -B install
mvn -B dockerfile:build
echo "Tagging ${GIT_COMMIT_SHA}"
mvn dockerfile:tag@tag-hash
source ./docker_test.sh
- name: Test with CodeCov
run: |
bash <(curl -s https://codecov.io/bash)