-
Notifications
You must be signed in to change notification settings - Fork 500
27 lines (25 loc) · 1.01 KB
/
trigger-react.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
name: Trigger REACT Buildkite Pipeline
on:
push:
branches: [ "main", "7.*", "8.*" ]
paths:
- 'rules/**/*.toml'
jobs:
trigger_buildkite:
runs-on: ubuntu-latest
steps:
- name: Trigger a Buildkite REACT Build
run: |
curl -X POST "https://api.buildkite.com/v2/organizations/elastic/pipelines/react/builds" \
-H "Authorization: Bearer ${{ secrets.REACT_BUILDKITE_API_TOKEN }}" \
-H "Content-Type: application/json" \
-d '{
"commit": "HEAD",
"branch": "main",
"message": ":github: Triggered from a DR GitHub Action",
"env": {
"GITHUB_COMMIT_HASH": "${{ github.sha }}",
"GITHUB_HEAD_BRANCH": "${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }}",
"GITHUB_SRC_BRANCH": "${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref || github.ref_name }}"
}
}'