-
Notifications
You must be signed in to change notification settings - Fork 31
42 lines (40 loc) · 1.14 KB
/
main.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
name: Push images on main branch update
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
java: [ 17 ]
name: Build OPEX and run tests with java ${{ matrix.java }}
steps:
- name: Checkout Source Code
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-package: jdk
java-version: ${{ matrix.java }}
# cache: maven
- name: Build
run: mvn -B -T 1C clean install
- name: Run Tests
run: mvn -B -T 1C -Dskip.unit.tests=false surefire:test
- name: Build Docker images
env:
TAG: latest
run: docker compose -f docker-compose.build.yml build
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push images to GitHub Container Registry
env:
TAG: latest
run: docker compose -f docker-compose.build.yml push