Skip to content

fix(web): guard team invites without instance scope #945

fix(web): guard team invites without instance scope

fix(web): guard team invites without instance scope #945

Workflow file for this run

name: PR Checks (Web)
on:
pull_request:
paths:
- 'apps/web/**'
- 'apps/docs/**'
- 'packages/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'turbo.json'
- '.github/workflows/pr-checks-web.yml'
push:
branches:
- main
paths:
- 'apps/web/**'
- 'apps/docs/**'
- 'packages/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'turbo.json'
- '.github/workflows/pr-checks-web.yml'
jobs:
web:
name: Web (lint / type-check / build)
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'self-hosted' }}
steps:
- name: Reset workspace ownership
run: |
docker run --rm -v "$GITHUB_WORKSPACE:/ws" alpine \
chown -R $(id -u):$(id -g) /ws 2>/dev/null || true
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v6
with:
version: '10.6.5'
- uses: actions/setup-node@v6
with:
node-version: '20'
cache: 'pnpm'
- name: Install dependencies
run: |
for attempt in 1 2 3; do
if pnpm install --frozen-lockfile; then
exit 0
fi
if [ "$attempt" -eq 3 ]; then
exit 1
fi
sleep $((attempt * 5))
done
- name: Lint
run: pnpm run lint
- name: Type check
run: pnpm run type-check
- name: Build
run: pnpm --filter web run build
env:
# Dummy env vars so Next.js build doesn't fail on missing secrets
DATABASE_URL: postgresql://dummy:dummy@localhost:5432/dummy
BETTER_AUTH_SECRET: dummy-secret-for-ci-build-only-at-least-32
BETTER_AUTH_URL: http://localhost:3000
NEXT_PUBLIC_APP_URL: http://localhost:3000
- name: Clean up runner disk
if: always()
run: |
set +e
# Reclaim any root-owned files Docker may have left behind so the
# delete below can actually remove them.
docker run --rm -v "$GITHUB_WORKSPACE:/ws" alpine \
chown -R "$(id -u):$(id -g)" /ws 2>/dev/null || true
find "$GITHUB_WORKSPACE" -mindepth 1 -delete 2>/dev/null || true
rm -rf /tmp/digests 2>/dev/null || true
# "until=1h" keeps cache layers a parallel job might still be using.
docker buildx prune -f --filter "until=1h" 2>/dev/null || true
docker system prune -f --filter "until=1h" 2>/dev/null || true
exit 0