Create flag and update label for a conflicted post #2514
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Checks with Danger | |
on: | |
pull_request: | |
# 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: | |
danger: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node_version: 10.x | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Cache Node Modules | |
id: cache-node-modules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: ${{ runner.os }}-node_modules | |
- name: Yarn Install | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
# frozen-lockfile will make the build fail if the lockfile is not there | |
run: yarn install --frozen-lockfile | |
- 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 |