feat: Implement proper branch-based auto-promotion strategy

🚀 **New Branching Strategy:**
- develop → triggers dev deployment → auto-promotes to staging branch
- staging → triggers staging deployment → manual approval → promotes to main branch
- main → triggers production deployment

📝 **Workflow Changes:**
- deploy-dev.yml: Now triggers on develop branch
- deploy-staging.yml: Now triggers on staging branch push
- deploy-prod.yml: Now triggers on main branch push
- auto-promote.yml: Tests dev → merges develop to staging branch
- promote-to-production.yml: Tests staging → requires approval → merges staging to main
- build-image.yml: Now builds on all branches (main, develop, staging)

🎯 **Auto-Promotion Flow:**
1. Push to develop → Deploy to dev → Test → Auto-merge to staging
2. Staging deployment → Test → Manual approval → Auto-merge to main
3. Main deployment → Production live!

This provides proper separation between environments with appropriate gates.
This commit is contained in:
Greg
2025-06-30 23:18:14 -07:00
parent 8f75e85968
commit 09ec016b6a
6 changed files with 178 additions and 107 deletions

View File

@@ -2,9 +2,9 @@ name: Build and Push Container Image
on:
push:
branches: [ main ]
branches: [ main, develop, staging ]
pull_request:
branches: [ main ]
branches: [ main, develop, staging ]
env:
REGISTRY: ghcr.io