Skip to content

Commit

Permalink
Consolidate all Danger workflows into one
Browse files Browse the repository at this point in the history
  • Loading branch information
mokagio committed Feb 24, 2020
1 parent 3a3ea93 commit 5863010
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 50 deletions.
41 changes: 0 additions & 41 deletions .github/workflows/danger-pr-labels.yml

This file was deleted.

24 changes: 15 additions & 9 deletions .github/workflows/danger-prs.yml → .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: iOS Consistency Checks
name: Run Checks with Danger
on:
pull_request:
# The restrictions on the types of pull_request event that can trigger this
# workflow is intentional. We only want to run these checks when the PR is
# opened or reopened, or its branch receives a push.
types: [opened, reopened, synchronize]
# Because we have a rule that validates the PR labels, we want it to run
# when the labels change, not only when a PR is opened/reopened or changes
# are pushed to it.
types: [opened, reopened, synchronize, labeled, unlabeled]

jobs:
check:
danger:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

Expand All @@ -32,10 +34,14 @@ jobs:
# frozen-lockfile will make the build fail if the lockfile is not there
run: yarn install --frozen-lockfile

- name: Check
- name: Validate Labels
run: |
yarn run danger ci \
--dangerfile Automattic/peril-settings/org/pr/label.ts \
--id pr_labels
- name: Consistency Checks
run: |
yarn run danger ci \
--dangerfile Automattic/peril-settings/org/pr/ios-macos.ts \
--id consistency_checks
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5863010

Please sign in to comment.