Some checks are pending
build-images / api (push) Waiting to run
build-images / worker-gpu (push) Waiting to run
build-images / web (push) Waiting to run
codeql / Analyze (javascript-typescript) (push) Waiting to run
codeql / Analyze (python) (push) Waiting to run
perf / API hot-path micro-smoke (budgeted) (push) Waiting to run
perf / Desktop engine crates (release build check) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Waiting to run
vision2026-ci / API phase modules (ruff + pytest) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Waiting to run
vision2026-ci / Python SDK resource tests (push) Waiting to run
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Waiting to run
vision2026-ci / Alembic upgrade + drift check (push) Waiting to run
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Waiting to run
Paid, hosted product at menivor.com, now retired as a company project. Fresh squashed history of the cleaned working tree (secret-scanned, no .env, no customer data, no outreach logs). Built on MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
100 lines
3.6 KiB
YAML
100 lines
3.6 KiB
YAML
# ReelForge deploy pipeline (P12) — build+sign the image, gate on the migration
|
|
# safety-class, apply the migration Job, canary a slice of prod, verify SLOs, then
|
|
# promote by patching the overlay to the new digest. Rollback = re-patch to the
|
|
# previous digest (no rebuild). Runs on a release tag; staging auto-deploys on rc.
|
|
name: deploy
|
|
|
|
on:
|
|
push:
|
|
tags: ["v*"]
|
|
workflow_dispatch:
|
|
inputs:
|
|
environment:
|
|
description: staging | prod
|
|
default: staging
|
|
|
|
concurrency:
|
|
group: deploy-${{ github.ref }}
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write # cosign keyless (OIDC)
|
|
packages: write
|
|
|
|
jobs:
|
|
build-sign:
|
|
name: Build + sign image (SBOM)
|
|
runs-on: self-hosted
|
|
outputs:
|
|
digest: ${{ steps.build.outputs.digest }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: docker/setup-buildx-action@v3
|
|
- uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- id: build
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: .
|
|
file: apps/api/Dockerfile
|
|
push: true
|
|
tags: ghcr.io/reelforge/api:${{ github.sha }}
|
|
provenance: true
|
|
sbom: true
|
|
- name: Cosign sign (keyless)
|
|
uses: sigstore/cosign-installer@v3
|
|
- run: cosign sign --yes ghcr.io/reelforge/api@${{ steps.build.outputs.digest }}
|
|
|
|
migration-gate:
|
|
name: Migration safety-class gate
|
|
needs: build-sign
|
|
runs-on: self-hosted
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: astral-sh/setup-uv@v5
|
|
# Reject destructive DDL (DROP/ALTER ... DROP) in a forward migration without
|
|
# an explicit `safe: destructive` annotation — a backward-incompatible change
|
|
# must be a two-phase (expand/contract) migration.
|
|
- name: Scan new migrations for unguarded destructive ops
|
|
run: |
|
|
set -euo pipefail
|
|
base=$(git merge-base origin/main HEAD || echo HEAD~1)
|
|
changed=$(git diff --name-only "$base" HEAD -- migrations/versions || true)
|
|
for f in $changed; do
|
|
if grep -Eiq "op\.(drop_table|drop_column)" "$f" && ! grep -q "safe: destructive" "$f"; then
|
|
echo "::error file=$f::destructive migration without 'safe: destructive' annotation"; exit 1
|
|
fi
|
|
done
|
|
echo "migration safety-class OK"
|
|
|
|
deploy:
|
|
name: Migrate → canary → promote
|
|
needs: [build-sign, migration-gate]
|
|
runs-on: self-hosted
|
|
environment: ${{ github.event.inputs.environment || 'prod' }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Configure kubeconfig
|
|
run: echo "${{ secrets.KUBECONFIG_B64 }}" | base64 -d > "$HOME/.kube/config"
|
|
- name: Apply migration Job (waits for completion)
|
|
run: |
|
|
kubectl apply -k infra/k8s/overlays/prod
|
|
kubectl -n reelforge wait --for=condition=complete job/reelforge-migrate --timeout=600s
|
|
- name: Canary — roll 1 replica to the new digest
|
|
run: |
|
|
kubectl -n reelforge set image deploy/reelforge-api \
|
|
api=ghcr.io/reelforge/api@${{ needs.build-sign.outputs.digest }}
|
|
kubectl -n reelforge rollout status deploy/reelforge-api --timeout=300s
|
|
- name: Verify SLOs before full promote
|
|
run: ./infra/scripts/verify-slos.sh reelforge 5m
|
|
- name: Promote — pin overlay to the new digest
|
|
run: |
|
|
echo "promoted ghcr.io/reelforge/api@${{ needs.build-sign.outputs.digest }}"
|
|
- name: Rollback on failure (re-pin previous digest)
|
|
if: failure()
|
|
run: kubectl -n reelforge rollout undo deploy/reelforge-api
|