-
-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (40 loc) · 1.07 KB
/
build.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
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up our JDK environment
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 19
- name: Install dependencies and run tests
run: ./gradlew jvmTest koverXmlReport
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up our JDK environment
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 19
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: nathanfallet
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
- name: Build and publish to Docker Hub
run: ./gradlew publishImage