Skip to content

Add Danger github action #1

Add Danger github action

Add Danger github action #1

Workflow file for this run

name: Danger Checks
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@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '2.6'
- uses: actions/cache@v3
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile') }} # change your gemfile path
restore-keys: |
${{ runner.os }}-gems-
- uses: MeilCli/danger-action@v5
with:
plugins_file: 'Gemfile'
install_path: 'vendor/bundle'
danger_file: 'Dangerfile'
danger_id: 'danger-pr'
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}