Skip to content

update k8.yaml

update k8.yaml #3

name: "Build and Push Images"
on:
push:
branches:
- main
# Remove `container-workflow` after testing
- container-workflow
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
service:
- name: ui
context: ./ui
- name: nginx
context: ./nginx
- name: customer-auth
context: ./customer-auth
- name: atm-locator
context: ./atm-locator
- name: dashboard
context: .
- name: accounts
context: .
- name: loan
context: .
- name: transactions
context: .
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/[email protected]
with:
context: ${{ matrix.service.context }}
file: ./${{ matrix.service.name }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/${{ github.repository }}-${{ matrix.service.name }}
cache-from: type=gha
cache-to: type=gha