Skip to content

Add logs (#73)

Add logs (#73) #26

name: "Build and Push Images"
on:
push:
paths:
- "app/**"
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
app:
- frontend
- backend1
- backend2
- loadgen
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[worker.oci]
max-parallelism = 2
- name: Build and push images
uses: docker/build-push-action@v3.3.0
with:
context: ./app/${{ matrix.app }}
file: ./app/${{ matrix.app }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}-${{ matrix.app }}
cache-from: type=gha
cache-to: type=gha