-
Notifications
You must be signed in to change notification settings - Fork 66
35 lines (29 loc) · 933 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
name: Danger
on: [pull_request]
permissions:
contents: read
pull-requests: write
statuses: write
jobs:
danger:
name: Danger
env:
BUNDLE_ENTERPRISE__CONTRIBSYS__COM: ${{ secrets.BUNDLE_ENTERPRISE__CONTRIBSYS__COM }}
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run Danger
run: bundle exec danger --head=${{ github.sha }} --base=${{ github.event.pull_request.base.sha }} --verbose
- name: Add Danger Label
uses: actions-ecosystem/action-remove-labels@v1
if: ${{ failure() && !contains(github.event.pull_request.labels.*.name, 'danger-alert') }}
with:
number: ${{ github.event.pull_request.number }}
labels: |
danger-alert