-
Notifications
You must be signed in to change notification settings - Fork 84
57 lines (53 loc) · 2.09 KB
/
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
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: PR checks
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
trigger-cypress:
# if not a fork
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: octokit/request-action@v2.x
id: dispatch_cypress
with:
route: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
owner: ${{ github.event.repository.owner.login }}
repo: ${{ github.event.repository.name }}
workflow_id: "cypress.yml"
ref: "master"
inputs: '{"number": "${{ github.event.pull_request.number }}"}'
env:
GITHUB_TOKEN: ${{ secrets.CYPRESS_WORKFLOW_TOKEN }}
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/request-action@v2.x
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 }}
trigger-playwright:
# if not a fork
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: octokit/request-action@v2.x
id: dispatch_playwright
with:
route: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches
owner: ${{ github.event.repository.owner.login }}
repo: ${{ github.event.repository.name }}
workflow_id: "playwright.yml"
ref: "master"
inputs: '{"number": "${{ github.event.pull_request.number }}"}'
env:
GITHUB_TOKEN: ${{ secrets.PLAYWRIGHT_WORKFLOW_TOKEN }}