Skip to content

Commit

Permalink
[FR] Add base pipeline to trigger react (#2768)
Browse files Browse the repository at this point in the history
(cherry picked from commit c443aad)
  • Loading branch information
Mikaayenson authored and github-actions[bot] committed May 4, 2023
1 parent f38f1da commit e8c6ec5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/trigger-react.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Trigger REACT Buildkite Pipeline

on:
push:
branches: [ "main", "7.*", "8.*" ]
paths:
- 'rules/**/*.toml'
pull_request:
branches: [ "*" ]
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 }}"
}
}'

0 comments on commit e8c6ec5

Please sign in to comment.