-
Notifications
You must be signed in to change notification settings - Fork 1
99 lines (88 loc) · 3.16 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Build
# Controls when the workflow will run
on:
workflow_dispatch:
push:
branches:
- 'main'
pull_request:
branches:
- 'main'
# permissions are needed if pushing to ghcr.io
permissions:
packages: write
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 17
cache: "maven"
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Install services
if: ${{ !matrix.sonar-enabled }}
run: |
./mvnw -B -U clean install
- name: Build and push auctions service
uses: docker/build-push-action@v2
with:
context: services/service-auctions
platforms: linux/amd64,linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/axoniq/axon-observability-auctions:latest
- name: Build and push auction-object-registry service
uses: docker/build-push-action@v2
with:
context: services/service-auction-object-registry
platforms: linux/amd64,linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/axoniq/axon-observability-auction-object-registry:latest
- name: Build and push auction-query service
uses: docker/build-push-action@v2
with:
context: services/service-auction-query
platforms: linux/amd64,linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/axoniq/axon-observability-auction-query:latest
- name: Build and push participants service
uses: docker/build-push-action@v2
with:
context: services/service-participants
platforms: linux/amd64,linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/axoniq/axon-observability-participants:latest
- name: Build and push interfaces service
uses: docker/build-push-action@v2
with:
context: services/service-interfaces
platforms: linux/amd64,linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/axoniq/axon-observability-interfaces:latest
- name: Build and push landing
uses: docker/build-push-action@v2
with:
context: frontend-landing
platforms: linux/amd64,linux/arm64/v8
push: ${{ github.event_name != 'pull_request' }}
tags: ghcr.io/axoniq/axon-observability-landing:latest