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    runs-on: ubuntu-latest
15
16    steps:
17      - uses: actions/checkout@v4
18
19      - uses: pnpm/action-setup@v3
20        with:
21          version: 8
22
23      - name: Setup Node
24        uses: actions/setup-node@v4
25        with:
26          node-version: "20"
27          cache: "pnpm"
28          cache-dependency-path: "script/danger/pnpm-lock.yaml"
29
30      - run: pnpm install --dir script/danger
31
32      - name: Run Danger
33        run: pnpm run --dir script/danger danger ci
34        env:
35          GITHUB_TOKEN: ${{ github.token }}