Repository navigation
chore: remove outdated roadmap and TODO documents #4
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: CI - Build & Lint | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| defaults: | |
| run: | |
| working-directory: ./app | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: "pnpm" | |
| cache-dependency-path: "./app/pnpm-lock.yaml" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Run linter | |
| run: pnpm lint | |
| - name: Type check | |
| run: pnpm type-check | |
| - name: Build project | |
| run: pnpm build | |
| create-issue-on-failure: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: failure() | |
| permissions: | |
| issues: write | |
| steps: | |
| - name: Create bug issue | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const title = `🐛 [CI FAILURE] Build failed on ${context.ref}`; | |
| const body = `## CI Build Failure | |
| **Workflow:** ${context.workflow} | |
| **Run ID:** ${context.runId} | |
| **Triggered by:** ${context.actor} | |
| **Branch/Ref:** ${context.ref} | |
| **Commit:** ${context.sha} | |
| ### Details | |
| The CI build has failed. Please investigate and fix the issue. | |
| [View workflow run](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}) | |
| ### Priority | |
| 🔴 **HIGH** - This blocks deployments to Vercel. | |
| --- | |
| *This issue was automatically created by the CI workflow.*`; | |
| const { data: issues } = await github.rest.issues.listForRepo({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| state: 'open', | |
| labels: 'bug,ci-failure' | |
| }); | |
| const existingIssue = issues.find(issue => | |
| issue.title.includes('[CI FAILURE]') && | |
| issue.body.includes(context.sha) | |
| ); | |
| if (!existingIssue) { | |
| await github.rest.issues.create({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| title: title, | |
| body: body, | |
| labels: ['bug', 'ci-failure', 'priority-high'] | |
| }); | |
| console.log('Bug issue created successfully'); | |
| } else { | |
| console.log('Issue already exists for this commit'); | |
| } |