Skip to content

Commit

Permalink
Add workflow_dispatch input
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Oct 2, 2024
1 parent acbe4f8 commit 27d2c04
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .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,5 +105,8 @@ jobs:

bench:
needs: [check]
if: ${{ github.event.pull_request.draft == false }}
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 27d2c04

Please sign in to comment.