Skip to content

Commit

Permalink
ci: suppress comment err and reduce benchmark running (#5454)
Browse files Browse the repository at this point in the history
  • Loading branch information
uiolee authored Apr 16, 2024
1 parent b5b63ca commit 43fcce3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
name: Benchmark

on:
workflow_dispatch:
push:
branches:
- "master"
paths:
- "lib/**"
- ".github/workflows/benchmark.yml"
pull_request:
branches:
- master
paths-ignore:
- "test/scripts/**"
- "master"
paths:
- "lib/**"
- ".github/workflows/benchmark.yml"

jobs:
benchmark:
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/commenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ permissions:

jobs:
comment-test:
name: How to test
permissions:
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
runs-on: ubuntu-latest
if: ${{github.event_name == 'pull_request_target' }}
if: ${{github.event_name == 'pull_request_target' && github.event.workflow_run.conclusion=='success'}}
steps:
- name: Comment PR - How to test
uses: marocchino/sticky-pull-request-comment@v2
Expand All @@ -33,6 +34,7 @@ jobs:
```
comment-flamegraph:
name: Flamegraph
permissions:
pull-requests: write # for marocchino/sticky-pull-request-comment to create or update PR comment
actions: read # get artifact
Expand All @@ -54,15 +56,17 @@ jobs:
echo "pr_number=$(cat .tmp-comment-pr_number)" >> "$GITHUB_ENV"
- name: combime comment
if: ${{env.pr_number!=''}}
run: |
echo "## flamegraph" > ${{env.comment_result}}
echo "## Flamegraph" > ${{env.comment_result}}
echo "" >> ${{env.comment_result}}
cat .tmp-comment-flamegraph-*.md >> ${{env.comment_result}}
- name: Comment PR - flamegraph
if: ${{env.pr_number!=''}}
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
number: ${{env.pr_number}}
header: flamegraph
header: Flamegraph
path: ${{env.comment_result}}

0 comments on commit 43fcce3

Please sign in to comment.