forked from RedisJSON/RedisJSON
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.07 KB
/
trigger-benchmark.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
name: Check if needs trigger CircleCI benchmark
on:
pull_request:
types: [opened, labeled, unlabeled, synchronize]
jobs:
haslabel:
name: analyse labels
runs-on: ubuntu-latest
outputs:
benchmark: ${{ steps.haslabel.outputs.labeled-run-benchmark }}
steps:
- uses: actions/checkout@v2
- name: Labeled with run-benchmark
id: haslabel
uses: DanielTamkin/HasLabel@v1.0.4
with:
contains: 'run-benchmark'
perf-ci:
name: Trigger CI benchmarks
needs: haslabel
if: needs.haslabel.outputs.benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: curl-circle-ci
run: |
curl --request POST \
--url https://circleci.com/api/v2/project/gh/${{ github.repository }}/pipeline \
--header 'Circle-Token: ${{ secrets.CIRCLE_CI_SECRET }}' \
--header 'content-type: application/json' \
--data '{"branch": "${{ github.event.pull_request.head.ref }}",
"parameters": {"run_default_flow":true, "run_benchmark_flow_label":true}}'