-
Notifications
You must be signed in to change notification settings - Fork 350
48 lines (44 loc) · 1.52 KB
/
wai-trigger-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
name: Trigger PR update for WAI-APG site
on:
pull_request_target:
branches-ignore:
- "dependabot/**"
paths:
- ".github/workflows/wai-trigger-pr.yml"
- ".github/workflows/regression.yml"
- ".github/workflows/examples.yml"
- "scripts/reference-tables.*"
- "**/*.js"
- "test/**"
- "content/**"
- "!content/landmarks/examples/**"
- "!common/**"
jobs:
create-pr-wai:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.pull_request.number }}/head
- name: Trigger wai-aria-practices PR update
uses: actions/github-script@v7
env:
APG_BRANCH: ${{ github.head_ref }}
APG_SHA: ${{ github.event.pull_request.head.sha }}
APG_PR_NUMBER: ${{ github.event.pull_request.number }}
FORK_PATH: ${{ github.event.pull_request.head.repo.fork && github.event.pull_request.head.repo.full_name }}
with:
github-token: ${{ secrets.W3CGRUNTBOT_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: 'wai-aria-practices',
workflow_id: 'pr-create.yml',
ref: 'main',
inputs: {
apg_branch: process.env.APG_BRANCH,
apg_sha: process.env.APG_SHA,
apg_pr_number: process.env.APG_PR_NUMBER,
fork_path: process.env.FORK_PATH,
}
});