pull_request_target runs in the context of the base repo, which should allow Danger to be able to comment on things from outside the repo: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target
21 lines
477 B
YAML
21 lines
477 B
YAML
name: Danger
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request_target:
|
|
types: [synchronize, edited, opened, reopened]
|
|
jobs:
|
|
run:
|
|
name: Run danger checks
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 100
|
|
submodules: 'recursive'
|
|
- name: Install danger
|
|
run: |
|
|
sudo gem install danger
|
|
- name: Run danger
|
|
env:
|
|
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: danger
|