-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (36 loc) · 1023 Bytes
/
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
name: Danger
on:
pull_request:
branches:
- main
jobs:
danger:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' # if only run pull request when multiple trigger workflow
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.7'
- uses: actions/cache@v1
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('.github/Gemfile') }} # change your gemfile path
restore-keys: |
${{ runner.os }}-gems-
- name: "Install gem dependencies"
run: |
cd .github
bundle install
- name: "Run awesome_bot"
run: make check_pr
- uses: MeilCli/danger-action@v5
with:
plugins_file: '.github/Gemfile'
install_path: 'vendor/bundle'
danger_file: '.github/Dangerfile'
danger_id: 'danger-pr'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}