-
Notifications
You must be signed in to change notification settings - Fork 86
23 lines (21 loc) · 821 Bytes
/
pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: PR checks
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
trigger-chromatic:
# if not a fork or a draft
if: ${{ github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.draft == false }}
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
id: dispatch_chromatic
with:
route: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
owner: ${{ github.event.repository.owner.login }}
repo: ${{ github.event.repository.name }}
workflow_id: "chromatic.yml"
ref: "master"
inputs: '{"number": "${{ github.event.pull_request.number }}"}'
env:
GITHUB_TOKEN: ${{ secrets.CHROMATIC_WORKFLOW_TOKEN }}