Skip to content

chore(ci): new CI action trigger for REACT testing workflow #5

chore(ci): new CI action trigger for REACT testing workflow

chore(ci): new CI action trigger for REACT testing workflow #5

name: REACT Tests Dispatcher
on:
pull_request:
paths:
- 'rules/**/*.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": "github.event.pull_request.base.ref",
"client_parameter": {
"pr_branch": "${{ github.event.pull_request.base.ref }}"
"pr_id": "${{ github.event.number }}",
}
}'
exit $?