chore: unify monorepo on Bun #2
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: acl-drift | |
| # Catch ui-template ACL type drift in the api-template PR that introduced | |
| # it. The generated file lives in ui-template's tree; without this gate, | |
| # changes to src/lib/acl/acl.constants.ts here ship without the | |
| # corresponding ui-template regeneration. | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "apps/api/src/lib/acl/acl.constants.ts" | |
| - "apps/api/scripts/codegen/generate-acl-types.ts" | |
| - ".github/workflows/apps-api-acl-drift.yml" | |
| pull_request: | |
| paths: | |
| - "apps/api/src/lib/acl/acl.constants.ts" | |
| - "apps/api/scripts/codegen/generate-acl-types.ts" | |
| - ".github/workflows/apps-api-acl-drift.yml" | |
| concurrency: | |
| group: apps-api-acl-drift-${{ github.ref }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| drift: | |
| name: ui-template ACL types are fresh | |
| defaults: | |
| run: | |
| working-directory: apps/api | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Checkout monorepo | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Set up Bun | |
| uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 | |
| with: | |
| bun-version: 1.3.13 | |
| - name: Install api-template deps | |
| working-directory: apps/api | |
| run: bun install --frozen-lockfile | |
| - name: Check ui-template ACL types are up-to-date | |
| working-directory: apps/api | |
| env: | |
| BORINGSTACK_UI_DIR: ${{ github.workspace }}/apps/ui | |
| run: | | |
| if ! bun run generate:acl-types:check; then | |
| echo "::error::apps/ui/src/lib/acl/acl.types.generated.ts is stale against this API change." | |
| echo "::error::To fix: from repo root run 'bun run regen' (or 'cd apps/api && bun run generate:acl-types') and commit apps/ui in the same PR." | |
| exit 1 | |
| fi |