Skip to content

Commit 4b3a31a

Browse files
committed
Do not use CodSpeedHQ/action on pull requests to a fork
1 parent 560db1f commit 4b3a31a

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,16 @@ jobs:
8888
GHA_LIBWEBP_CACHE_HIT: ${{ steps.cache-libwebp.outputs.cache-hit }}
8989

9090
- name: Run CodSpeed benchmarks
91+
if: github.event_name != 'pull_request' || github.event.repository.fork == false
9192
uses: CodSpeedHQ/action@a4a36bb07c0638b0b4ca52bf1f3dad1b4289e52f # v4.18.1
9293
with:
9394
mode: simulation
9495
run: |
9596
python3 -m pip install -e . pytest-codspeed
9697
python3 -m pytest -vv --codspeed Tests/benchmarks.py
98+
99+
- name: Run CodSpeed benchmarks on pull requests to a fork
100+
if: github.event_name == 'pull_request' && github.event.repository.fork == true
101+
run: |
102+
python3 -m pip install -e . pytest-codspeed
103+
python3 -m pytest -vv --codspeed Tests/benchmarks.py

0 commit comments

Comments
 (0)