-
Notifications
You must be signed in to change notification settings - Fork 630
42 lines (40 loc) · 1.6 KB
/
react-tests-dispatcher.yml
File metadata and controls
42 lines (40 loc) · 1.6 KB
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
name: REACT Tests Dispatcher
on:
pull_request:
paths:
- 'rules/**/*.toml'
- '!rules/_deprecated/**.toml'
- '!rules/integrations/aws/*.toml'
- '!rules/integrations/aws_bedrock/*.toml'
- '!rules/integrations/azure/*.toml'
- '!rules/integrations/beaconing/*.toml'
- '!rules/integrations/cloud_defend/*.toml'
- '!rules/integrations/cyberarkpas/*.toml'
- '!rules/integrations/ded/*.toml'
- '!rules/integrations/dga/*.toml'
- '!rules/integrations/fim/*.toml'
- '!rules/integrations/gcp/*.toml'
- '!rules/integrations/github/*.toml'
- '!rules/integrations/google_workspace/*.toml'
- '!rules/integrations/kubernetes/*.toml'
- '!rules/integrations/lmd/*.toml'
- '!rules/integrations/o365/*.toml'
- '!rules/integrations/okta/*.toml'
- '!rules/integrations/problemchild/*.toml'
- '!rules/integrations/pad/*.toml'
jobs:
dispatch:
name: Run REACT tests
runs-on: ubuntu-latest
steps:
- name: Trigger REACT workflow
env:
REACT_WORKFLOW_ID: "detection-rules-tests.yml"
run: |
curl -X POST \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Content-Type: application/json" \
-H "Authorization: token ${{ secrets.WRITE_DETECTION_RULES_REACT_TOKEN }}" \
"https://api.github.com/repos/elastic/react/actions/workflows/$REACT_WORKFLOW_ID/dispatches" \
-d '{"ref": "main", "inputs": {"pr_branch": "${{ github.head_ref || github.ref_name }}", "pr_id": "${{ github.event.number }}"}}'
exit $?