Skip to content

Commit 43fcce3

Browse files
authored
ci: suppress comment err and reduce benchmark running (#5454)
1 parent b5b63ca commit 43fcce3

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.github/workflows/benchmark.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
name: Benchmark
22

33
on:
4+
workflow_dispatch:
45
push:
6+
branches:
7+
- "master"
58
paths:
69
- "lib/**"
10+
- ".github/workflows/benchmark.yml"
711
pull_request:
812
branches:
9-
- master
10-
paths-ignore:
11-
- "test/scripts/**"
13+
- "master"
14+
paths:
15+
- "lib/**"
16+
- ".github/workflows/benchmark.yml"
1217

1318
jobs:
1419
benchmark:

.github/workflows/commenter.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ permissions:
1313

1414
jobs:
1515
comment-test:
16+
name: How to test
1617
permissions:
1718
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
1819
runs-on: ubuntu-latest
19-
if: ${{github.event_name == 'pull_request_target' }}
20+
if: ${{github.event_name == 'pull_request_target' && github.event.workflow_run.conclusion=='success'}}
2021
steps:
2122
- name: Comment PR - How to test
2223
uses: marocchino/sticky-pull-request-comment@v2
@@ -33,6 +34,7 @@ jobs:
3334
```
3435
3536
comment-flamegraph:
37+
name: Flamegraph
3638
permissions:
3739
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
3840
actions: read # get artifact
@@ -54,15 +56,17 @@ jobs:
5456
echo "pr_number=$(cat .tmp-comment-pr_number)" >> "$GITHUB_ENV"
5557
5658
- name: combime comment
59+
if: ${{env.pr_number!=''}}
5760
run: |
58-
echo "## flamegraph" > ${{env.comment_result}}
61+
echo "## Flamegraph" > ${{env.comment_result}}
5962
echo "" >> ${{env.comment_result}}
6063
cat .tmp-comment-flamegraph-*.md >> ${{env.comment_result}}
6164
6265
- name: Comment PR - flamegraph
66+
if: ${{env.pr_number!=''}}
6367
uses: marocchino/sticky-pull-request-comment@v2
6468
with:
6569
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
6670
number: ${{env.pr_number}}
67-
header: flamegraph
71+
header: Flamegraph
6872
path: ${{env.comment_result}}

0 commit comments

Comments
 (0)