Edit Tutorial: run-app-with-docker-compose.adoc #92
Workflow file for this run
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/setup-java@v3.11.0 | |
with: | |
distribution: 'corretto' | |
java-version: 21 | |
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 | |
run: | | |
sh create-microservices.sh | |
sh mvnw -B -U clean install | |
- name: Build and push Command service | |
uses: docker/build-push-action@v2 | |
with: | |
context: microservices/rental-command | |
#platforms: linux/amd64,linux/arm64, linux/arm/v7, linux/arm/v8 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ghcr.io/axoniq/bike-rental-command:latest | |
- name: Build and push Rental Payment service | |
uses: docker/build-push-action@v2 | |
with: | |
context: microservices/rental-payment | |
#platforms: linux/amd64,linux/arm64, linux/arm/v7, linux/arm/v8 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ghcr.io/axoniq/bike-rental-rental-payment:latest | |
- name: Build and push Payment service | |
uses: docker/build-push-action@v2 | |
with: | |
context: payment | |
#platforms: linux/amd64,linux/arm64, linux/arm/v7, linux/arm/v8 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ghcr.io/axoniq/bike-rental-payment:latest | |
- name: Build and push Query service | |
uses: docker/build-push-action@v2 | |
with: | |
context: microservices/rental-query | |
#platforms: linux/amd64,linux/arm64, linux/arm/v7, linux/arm/v8 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ghcr.io/axoniq/bike-rental-query:latest | |
- name: Build and push UI service | |
uses: docker/build-push-action@v2 | |
with: | |
context: microservices/rental-ui | |
#platforms: linux/amd64,linux/arm64, linux/arm/v7, linux/arm/v8 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ghcr.io/axoniq/bike-rental-ui:latest | |
- name: Build and push complete Rental service | |
uses: docker/build-push-action@v2 | |
with: | |
context: rental | |
#platforms: linux/amd64,linux/arm64, linux/arm/v7, linux/arm/v8 | |
platforms: linux/amd64,linux/arm64 | |
push: ${{ github.event_name != 'pull_request' }} | |
tags: ghcr.io/axoniq/bike-rental:latest | |