2024-01-29 16:58:24 +00:00
|
|
|
name: Danger
|
|
|
|
|
|
|
|
on:
|
2024-02-16 03:04:57 +00:00
|
|
|
pull_request:
|
|
|
|
branches: [main]
|
|
|
|
types:
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
- reopened
|
|
|
|
- edited
|
2024-01-29 16:58:24 +00:00
|
|
|
|
|
|
|
jobs:
|
2024-02-16 03:04:57 +00:00
|
|
|
danger:
|
|
|
|
runs-on: ubuntu-latest
|
2024-01-29 16:58:24 +00:00
|
|
|
|
2024-02-16 03:04:57 +00:00
|
|
|
steps:
|
2024-07-25 13:19:05 +00:00
|
|
|
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
|
2024-01-29 16:58:24 +00:00
|
|
|
|
2024-07-29 13:06:19 +00:00
|
|
|
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
2024-02-16 03:04:57 +00:00
|
|
|
with:
|
2024-06-14 15:08:15 +00:00
|
|
|
version: 9
|
2024-01-29 16:58:24 +00:00
|
|
|
|
2024-02-16 03:04:57 +00:00
|
|
|
- name: Setup Node
|
2024-07-25 13:19:05 +00:00
|
|
|
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4
|
2024-02-16 03:04:57 +00:00
|
|
|
with:
|
|
|
|
node-version: "20"
|
|
|
|
cache: "pnpm"
|
|
|
|
cache-dependency-path: "script/danger/pnpm-lock.yaml"
|
2024-01-29 16:58:24 +00:00
|
|
|
|
2024-02-16 03:04:57 +00:00
|
|
|
- run: pnpm install --dir script/danger
|
2024-01-29 16:58:24 +00:00
|
|
|
|
2024-02-16 03:04:57 +00:00
|
|
|
- name: Run Danger
|
|
|
|
run: pnpm run --dir script/danger danger ci
|
|
|
|
env:
|
2024-04-11 04:01:20 +00:00
|
|
|
# This GitHub token is not used, but the value needs to be here to prevent
|
|
|
|
# Danger from throwing an error.
|
|
|
|
GITHUB_TOKEN: "not_a_real_token"
|
|
|
|
# All requests are instead proxied through an instance of
|
|
|
|
# https://github.com/maxdeviant/danger-proxy that allows Danger to securely
|
|
|
|
# authenticate with GitHub while still being able to run on PRs from forks.
|
|
|
|
DANGER_GITHUB_API_BASE_URL: "https://danger-proxy.fly.dev/github"
|