danger.yml

 1name: Danger
 2
 3on:
 4  pull_request:
 5    branches: [main]
 6    types:
 7      - opened
 8      - synchronize
 9      - reopened
10      - edited
11
12jobs:
13  danger:
14    if: github.repository_owner == 'zed-industries'
15    runs-on: namespace-profile-2x4-ubuntu-2404
16
17    steps:
18      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
19
20      - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
21        with:
22          version: 9
23
24      - name: Setup Node
25        uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
26        with:
27          node-version: "20"
28          cache: "pnpm"
29          cache-dependency-path: "script/danger/pnpm-lock.yaml"
30
31      - run: pnpm install --dir script/danger
32
33      - name: Run Danger
34        run: pnpm run --dir script/danger danger ci
35        env:
36          # This GitHub token is not used, but the value needs to be here to prevent
37          # Danger from throwing an error.
38          GITHUB_TOKEN: "not_a_real_token"
39          # All requests are instead proxied through an instance of
40          # https://github.com/maxdeviant/danger-proxy that allows Danger to securely
41          # authenticate with GitHub while still being able to run on PRs from forks.
42          DANGER_GITHUB_API_BASE_URL: "https://danger-proxy.fly.dev/github"