mirror of
https://github.com/karpathy/nanochat.git
synced 2026-05-08 08:49:53 +00:00
Adds GitHub Actions workflows for per-service CI (paths-filter gated), dev image builds to ECR via OIDC, RC*-tag UAT promotion with image re-tagging and Helm deploy, v*-tag blue/green prod release with smoke test + ingress swap, and a nightly docker-compose integration suite. Ships a Helm umbrella chart (dev/uat/prod values) with Deployments, ClusterIP Services, ALB Ingress (samosachaat.art + grafana host), HPAs for chat-api/inference in prod, PDBs, ConfigMap/Secret wiring, and an alembic db-migrate Helm hook job. Wires commitlint + husky for Conventional Commits at the repo root. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: Build & Push Dev Images
|
|
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
|
|
concurrency:
|
|
group: build-dev-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
id-token: write
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: Build ${{ matrix.service }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
service: [frontend, auth, chat-api, inference]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Configure AWS credentials (OIDC)
|
|
uses: aws-actions/configure-aws-credentials@v4
|
|
with:
|
|
role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
|
|
aws-region: ${{ vars.AWS_REGION || 'us-east-1' }}
|
|
|
|
- name: Login to Amazon ECR
|
|
id: ecr-login
|
|
uses: aws-actions/amazon-ecr-login@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build & push image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: services/${{ matrix.service }}
|
|
file: services/${{ matrix.service }}/Dockerfile
|
|
push: true
|
|
tags: |
|
|
${{ steps.ecr-login.outputs.registry }}/samosachaat/${{ matrix.service }}:dev-${{ github.sha }}
|
|
${{ steps.ecr-login.outputs.registry }}/samosachaat/${{ matrix.service }}:dev-latest
|
|
cache-from: type=gha,scope=${{ matrix.service }}
|
|
cache-to: type=gha,mode=max,scope=${{ matrix.service }}
|