-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.19 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
43
44
45
46
47
48
49
name: Build and deploy
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: microsoft
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: 'arm64,arm'
- name: Setup Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerRegistry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: |
mvn -B package --no-transfer-progress -Pproduction
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/bbzblit/m233/app:latest --push .
- name: Check if tests passed
run: mvn -B test --no-transfer-progress
continue-on-error: true
- name: Publish test results
uses: EnricoMi/publish-unit-test-result-action@v1
if: always()
with:
files: '**/surefire-reports/TEST-*.xml'
check_name: Unit Tests