Add caching to the aggregates #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |