-
Notifications
You must be signed in to change notification settings - Fork 15
55 lines (52 loc) · 1.46 KB
/
danger.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Danger
on:
pull_request:
branches:
- '**'
issue_comment:
types:
- created
jobs:
danger-for-internal:
name: Danger for internal
if: |
github.event_name == 'pull_request'
&& github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- name: Clone the source for the event
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Danger JS
run: npx danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
danger-for-external:
name: Danger for external
if: |
github.event_name == 'issue_comment' && github.event.action == 'created'
&& github.event.issue.pull_request != null
&& startsWith(github.event.comment.body, '/check')
runs-on: ubuntu-latest
steps:
- name: Check repository permission for user
uses: sushichop/action-repository-permission@v1
with:
required-permission: write
reaction-permitted: rocket
- name: Clone the PR source
uses: actions/checkout@v2
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 16.x
- name: Danger JS
run: npx danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}