Skip to content

Commit

Permalink
ci(bench): don't run on draft PRs (#2147)
Browse files Browse the repository at this point in the history
* ci(bench): don't run on draft PRs

* Add workflow_dispatch input
  • Loading branch information
mxinden authored Oct 3, 2024
1 parent eb92e43 commit c796b5c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ on:
paths-ignore: ["*.md", "*.png", "*.svg", "LICENSE-*"]
merge_group:
workflow_dispatch:
inputs:
run_benchmarks:
description: 'Run benchmarks'
type: boolean
required: false
default: false
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
Expand Down Expand Up @@ -99,4 +105,8 @@ jobs:

bench:
needs: [check]
if: >
(github.event_name == 'workflow_dispatch' && github.event.inputs.run_benchmarks) ||
(github.event_name == 'pull_request' && !github.event.pull_request.draft) ||
(github.event_name != 'workflow_dispatch' && github.event_name != 'pull_request')
uses: ./.github/workflows/bench.yml

0 comments on commit c796b5c

Please sign in to comment.