mirror of
https://github.com/ghndrx/k8s-game-2048.git
synced 2026-02-10 06:45:07 +00:00
🧹 PII Cleanup & Security: - Remove all hardcoded domains (darknex.us, hndrx.co) - Remove all hardcoded emails (admin@ references) - Replace all personal info with environment variables - Repository now 100% generic and reusable 🚀 Fully Automatic Pipeline: - Pipeline now runs automatically develop → staging → production - No manual intervention required for production promotions - Auto-promotion triggers after successful tests - All workflows use commit-specific image tags 🔧 Environment Variables: - All manifests use ${VARIABLE_NAME} syntax - All scripts source from .env file - GitHub Actions use secrets for sensitive data - Complete .env.example template provided 📚 Documentation: - New comprehensive WORKFLOWS.md with pipeline details - New PIPELINE_QUICK_REFERENCE.md for quick reference - Updated all docs to use generic placeholders - Added security/privacy section to README 🔐 Security Enhancements: - Updated .gitignore for all sensitive files - Created PII verification script (verify-pii-removal.sh) - Created cleanup automation script (cleanup-pii.sh) - Repository verified PII-free and production-ready BREAKING: Repository now requires .env configuration - Copy .env.example to .env and configure for your environment - Set GitHub repository secrets for CI/CD workflows - All deployments now use environment-specific configuration
87 lines
3.4 KiB
YAML
87 lines
3.4 KiB
YAML
name: Auto-Promote Pipeline
|
||
|
||
on:
|
||
workflow_run:
|
||
workflows: ["Smoke Tests"]
|
||
types:
|
||
- completed
|
||
branches: [ develop ]
|
||
|
||
permissions:
|
||
actions: write
|
||
contents: write
|
||
|
||
jobs:
|
||
test-and-promote-to-staging:
|
||
name: Test Dev and Auto-Promote to Staging
|
||
runs-on: ubuntu-latest
|
||
environment: development
|
||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||
|
||
steps:
|
||
- name: Checkout repository
|
||
uses: actions/checkout@v4
|
||
with:
|
||
ref: develop
|
||
|
||
- name: Wait for smoke test results to settle
|
||
run: |
|
||
echo "⏳ Smoke tests completed, proceeding with promotion..."
|
||
sleep 30
|
||
|
||
- name: Verify dev smoke tests passed
|
||
run: |
|
||
echo "✅ Development smoke tests passed - proceeding with auto-promotion to staging"
|
||
|
||
- name: Auto-promote develop to staging branch
|
||
uses: actions/github-script@v7
|
||
with:
|
||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||
script: |
|
||
console.log('🚀 All dev smoke tests passed! Auto-promoting develop to staging branch...');
|
||
|
||
// Create a merge from develop to staging
|
||
try {
|
||
const response = await github.rest.repos.merge({
|
||
owner: context.repo.owner,
|
||
repo: context.repo.repo,
|
||
base: 'staging',
|
||
head: 'develop',
|
||
commit_message: 'Auto-promote: Merge develop to staging after successful dev tests'
|
||
});
|
||
|
||
console.log('✅ Successfully merged develop to staging branch');
|
||
console.log('This will trigger staging deployment automatically');
|
||
|
||
return response;
|
||
} catch (error) {
|
||
if (error.status === 409) {
|
||
console.log('ℹ️ No new commits to merge - staging is already up to date');
|
||
} else {
|
||
throw error;
|
||
}
|
||
}
|
||
|
||
- name: Create promotion summary
|
||
run: |
|
||
echo "## 🎯 Auto-Promotion Summary (Develop → Staging)" >> $GITHUB_STEP_SUMMARY
|
||
echo "" >> $GITHUB_STEP_SUMMARY
|
||
echo "| Stage | Status | Action |" >> $GITHUB_STEP_SUMMARY
|
||
echo "|-------|--------|--------|" >> $GITHUB_STEP_SUMMARY
|
||
echo "| Dev Tests | ✅ Passed | Comprehensive validation completed |" >> $GITHUB_STEP_SUMMARY
|
||
echo "| Staging Branch | 🚀 Updated | Auto-promotion completed |" >> $GITHUB_STEP_SUMMARY
|
||
echo "| Staging Deploy | ⏳ Triggered | Deployment will start automatically |" >> $GITHUB_STEP_SUMMARY
|
||
echo "" >> $GITHUB_STEP_SUMMARY
|
||
echo "### 📋 Tests Performed" >> $GITHUB_STEP_SUMMARY
|
||
echo "- Canonical domain accessibility check" >> $GITHUB_STEP_SUMMARY
|
||
echo "- Content and functionality validation" >> $GITHUB_STEP_SUMMARY
|
||
echo "- Performance testing" >> $GITHUB_STEP_SUMMARY
|
||
echo "" >> $GITHUB_STEP_SUMMARY
|
||
echo "### 🔗 Next Steps" >> $GITHUB_STEP_SUMMARY
|
||
echo "- Staging deployment will start automatically" >> $GITHUB_STEP_SUMMARY
|
||
echo "- Staging tests will run automatically" >> $GITHUB_STEP_SUMMARY
|
||
echo "- Production promotion will happen automatically after staging tests pass" >> $GITHUB_STEP_SUMMARY
|
||
echo "- Production deployment will happen automatically after promotion" >> $GITHUB_STEP_SUMMARY
|
||
echo "" >> $GITHUB_STEP_SUMMARY
|
||
echo "🚀 **Fully Automatic Pipeline** - No manual intervention required!" >> $GITHUB_STEP_SUMMARY
|