ci(anion): remove diagnostic steps now that pipeline is stable #374
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Client Project Build Trigger | ||
| on: | ||
| repository_dispatch: | ||
| types: [client_approved_scope] | ||
| jobs: | ||
| scaffold: | ||
| if: false # DISABLED 2026-04-30 — bleed-stop. Re-enable when client intake reactivates. | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| PROJECT_NAME: ${{ github.event.client_payload.project_name }} | ||
| CLIENT_EMAIL: ${{ github.event.client_payload.client_email }} | ||
| PROJECT_ID: ${{ github.event.client_payload.project_id }} | ||
| steps: | ||
| - name: Checkout main branch | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: main | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| - name: Install dependencies | ||
| run: npm ci | ||
| - name: Create feature branch | ||
| run: | | ||
| git config user.name "FTC Automation" | ||
| git config user.email "automation@unalabs.cloud" | ||
| # Normalize project name for branch | ||
| BRANCH_NAME=$(echo "feat/${PROJECT_NAME,,}" | sed 's/[^a-z0-9\-]/-/g') | ||
| echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV | ||
| git checkout -b "$BRANCH_NAME" || git checkout "$BRANCH_NAME" | ||
| - name: Scaffold project structure | ||
| run: | | ||
| # Create project directory if it doesn't exist | ||
| PROJECT_DIR="APPS/${PROJECT_NAME}" | ||
| if [ ! -d "$PROJECT_DIR" ]; then | ||
| echo "Creating project directory: $PROJECT_DIR" | ||
| mkdir -p "$PROJECT_DIR" | ||
| # Copy governance skill to project | ||
| mkdir -p "$PROJECT_DIR/.github/skills" | ||
| cp -r ".github/skills/ftc-project-governance" "$PROJECT_DIR/.github/skills/" || true | ||
| # Create basic docs structure | ||
| mkdir -p "$PROJECT_DIR/DOCS/product" "$PROJECT_DIR/DOCS/architecture" "$PROJECT_DIR/DOCS/adr" "$PROJECT_DIR/DOCS/status" | ||
| # Create app structure (web + mobile stubs) | ||
| mkdir -p "$PROJECT_DIR/apps/web/src/{components,pages,hooks,services,lib,types,styles}" | ||
| mkdir -p "$PROJECT_DIR/apps/mobile/src/{screens,components,hooks,services,types}" | ||
| mkdir -p "$PROJECT_DIR/packages/types" | ||
| mkdir -p "$PROJECT_DIR/packages/shared" | ||
| # Create basic package.json for project | ||
| cat > "$PROJECT_DIR/package.json" << 'EOF' | ||
| { | ||
| "name": "@ftc/${PROJECT_NAME,,}", | ||
| "version": "0.1.0", | ||
| "private": true, | ||
| "description": "FTC Client Project", | ||
| "workspaces": [ | ||
| "apps/web", | ||
| "apps/mobile", | ||
| "packages/*" | ||
| ], | ||
| "scripts": { | ||
| "dev:web": "npm --workspace=apps/web run dev", | ||
| "dev:mobile": "npm --workspace=apps/mobile run dev", | ||
| "build": "npm run build --workspaces", | ||
| "check": "npm run check --workspaces" | ||
| } | ||
| } | ||
| EOF | ||
| # Create initial README | ||
| cat > "$PROJECT_DIR/README.md" << 'EOF' | ||
| # ${PROJECT_NAME} | ||
| ## Project Details | ||
| - **Client Email**: ${CLIENT_EMAIL} | ||
| - **Project ID**: ${PROJECT_ID} | ||
| - **Status**: Active | ||
| - **Created**: $(date -u +%Y-%m-%dT%H:%M:%SZ) | ||
| ## Structure | ||
| - `apps/web` - Web application (Vite + React) | ||
| - `apps/mobile` - Mobile application (React Native) | ||
| - `packages/types` - Shared TypeScript types | ||
| - `packages/shared` - Shared utilities and constants | ||
| - `DOCS/` - Project documentation, architecture, ADRs, and status | ||
| ## Getting Started | ||
| ```bash | ||
| npm install | ||
| npm run dev:web # Start web dev server | ||
| npm run dev:mobile # Start mobile dev server | ||
| ``` | ||
| ## Build | ||
| ```bash | ||
| npm run build | ||
| npm run check # TypeScript check | ||
| ``` | ||
| ## Deployment | ||
| See `DOCS/` for deployment runbooks and architecture decisions. | ||
| ## Status | ||
| Track progress on your [Unalabs Dashboard](https://unalabs.cloud/dashboard/${PROJECT_ID}/delivery) | ||
| EOF | ||
| fi | ||
| - name: Create initial scaffold commit | ||
| run: | | ||
| git add . | ||
| git commit -m "feat(${{ env.PROJECT_NAME }}): Initial project scaffold with governance framework | ||
| - Created web and mobile app structure | ||
| - Added project documentation skeleton | ||
| - Set up workspace configuration | ||
| - Initialized for Phase 1 development | ||
| Client: ${{ env.CLIENT_EMAIL }} | ||
| Project ID: ${{ env.PROJECT_ID }}" || echo "No changes to commit" | ||
| - name: Push branch to remote | ||
| run: | | ||
| git push -u origin "${{ env.BRANCH_NAME }}" --force-with-lease | ||
| - name: Create Pull Request | ||
| uses: actions/github-script@v7 | ||
| with: | ||
| script: | | ||
| const { repo, context } = github; | ||
| const branchName = process.env.BRANCH_NAME; | ||
| const projectName = process.env.PROJECT_NAME; | ||
| const clientEmail = process.env.CLIENT_EMAIL; | ||
| const body = `## ${projectName} — Initial Scaffold | ||
| **Client**: ${clientEmail} | ||
| ### Changes | ||
| - ✅ Project directory structure created | ||
| - ✅ Workspace configuration initialized | ||
| - ✅ Governance framework linked | ||
| - ✅ Documentation skeleton created | ||
| ### What Happens Next | ||
| 1. FTC team reviews and approves scaffold | ||
| 2. Phase 1 development begins | ||
| 3. Weekly status updates sent to ${clientEmail} | ||
| 4. Track progress on [Unalabs Dashboard](https://unalabs.cloud/dashboard/${{ env.PROJECT_ID }}/delivery) | ||
| ### Structure | ||
| \`\`\` | ||
| ${projectName}/ | ||
| ├── apps/ | ||
| │ ├── web/ (React web application) | ||
| │ └── mobile/ (React Native mobile) | ||
| ├── packages/ | ||
| │ ├── types/ (Shared TypeScript types) | ||
| │ └── shared/ (Shared utilities) | ||
| └── DOCS/ (Architecture, status, decisions) | ||
| \`\`\` | ||
| --- | ||
| This PR was auto-generated when scope was approved. It includes the initial project scaffold and is ready for Phase 1 development. | ||
| `; | ||
| const pr = await github.rest.pulls.create({ | ||
| owner: repo.owner, | ||
| repo: repo.repo, | ||
| title: `feat(${projectName}): Initial project scaffold`, | ||
| head: branchName, | ||
| base: 'main', | ||
| body: body, | ||
| draft: true, // Start as draft for review | ||
| }); | ||
| console.log(`Created PR #${pr.data.number}`); | ||
| - name: Update Supabase with build status | ||
| env: | ||
| SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | ||
| SUPABASE_SERVICE_ROLE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | ||
| run: | | ||
| # This would call a Supabase edge function to update build_pr_url and workflow_status | ||
| # For now, log the update | ||
| echo "Build started for ${{ env.PROJECT_NAME }}" | ||
| echo "Branch: ${{ env.BRANCH_NAME }}" | ||
| echo "Project ID: ${{ env.PROJECT_ID }}" | ||
| echo "Client: ${{ env.CLIENT_EMAIL }}" | ||
| - name: Notify client | ||
| env: | ||
| RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} | ||
| run: | | ||
| # Send email notification to client | ||
| # This would call Resend API to send notification | ||
| echo "Build workflow triggered for ${{ env.PROJECT_NAME }}" | ||
| echo "Client notification pending: ${{ env.CLIENT_EMAIL }}" | ||