diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 555b1fcaf..90262f428 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -2,11 +2,12 @@ name: Benchmark on: issue_comment: - types: [created] + types: created jobs: benchmark_base: - if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-benchmark') + # On pull requests and if the comment starts with `/run-benchmark` + if: github.event.issue.pull_request != null && startsWith(github.event.comment.body, '/run-benchmark') runs-on: self-hosted steps: