-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.3 KB
/
build-aggregator.yaml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build aggregator
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
paths: ['aggregator/**']
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with maven
working-directory: aggregator/
run: mvn --batch-mode clean package
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: aggregator
path: aggregator/
publish:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: aggregator
path: aggregator/
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: aggregator/
file: aggregator/src/main/docker/Dockerfile.jvm
push: true
tags: spoud/kafka-cost-control:latest