Skip to content

Commit ad0d576

Browse files
committed
update conditional benchmark check
1 parent 02641f7 commit ad0d576

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

.github/workflows/benchmark.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,9 @@ permissions:
1515

1616
jobs:
1717
run_benchmarks:
18+
if: "!contains(github.event.pull_request.title, '[no benchmark]') && !contains(github.event.pull_request.body, '[no benchmark]')"
1819
runs-on: ubuntu-latest
1920
steps:
20-
- name: Check for '[no benchmark]' in PR
21-
id: check-no-benchmark
22-
run: |
23-
if [[ "${{ github.event.pull_request.title }}" == *"[no benchmark]"* ]] || [[ "${{ github.event.pull_request.body }}" == *"[no benchmark]"* ]]; then
24-
echo "Skipping benchmarks because '[no benchmark]' is found in the PR title or body."
25-
echo "skip_benchmark=true" >> $GITHUB_ENV
26-
else
27-
echo "skip_benchmark=false" >> $GITHUB_ENV
28-
fi
29-
- name: Exit if skipping benchmarks
30-
if: env.skip_benchmark == 'true'
31-
run: exit 0
3221
- uses: actions/checkout@v4
3322
with:
3423
fetch-depth: 0 # fetch all history

0 commit comments

Comments
 (0)