Skip to content

fix: address code review findings across monitoring, chart, and genai #145

fix: address code review findings across monitoring, chart, and genai

fix: address code review findings across monitoring, chart, and genai #145

Workflow file for this run

name: Build and Push All Services to GHCR
on:
push:
branches: ["**"]
workflow_dispatch:
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
OWNER: aet-devops26
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
# 🟢 Spring services (own Dockerfile per service)
- service: account-service
dockerfile: server/account-service/Dockerfile
context: server
- service: transaction-service
dockerfile: server/transaction-service/Dockerfile
context: server
- service: orchestrator-service
dockerfile: server/orchestrator-service/Dockerfile
context: server
- service: banking-service
dockerfile: server/banking-service/Dockerfile
context: server
# 🟡 standalone services
- service: genai-service
dockerfile: genai/Dockerfile
context: genai
- service: client
dockerfile: client/Dockerfile
context: client
steps:
- uses: actions/checkout@v7
- name: Log in to GHCR
uses: docker/login-action@v4
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push
run: |
docker build \
-t $REGISTRY/$OWNER/${{ matrix.service }}:latest \
-t $REGISTRY/$OWNER/${{ matrix.service }}:${{ github.sha }} \
-f ${{ matrix.dockerfile }} \
${{ matrix.context }}
# Push only on manual dispatch or merge to main
if [[ "${{ github.event_name }}" == "workflow_dispatch" || "${{ github.ref_name }}" == "main" ]]; then
echo "Pushing images to GHCR"
docker push $REGISTRY/$OWNER/${{ matrix.service }}:latest
docker push $REGISTRY/$OWNER/${{ matrix.service }}:${{ github.sha }}
else
echo "Skipping push (branch: ${{ github.ref_name }}, event: ${{ github.event_name }})"
fi