Skip to content

Commit b44795b

Browse files
committed
ci: Restrict benchmark uploads and comments to main and PRs with proper permissions
1 parent 4ee51ba commit b44795b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ jobs:
3737
output-file-path: output.txt
3838
github-token: ${{ secrets.GITHUB_TOKEN }}
3939
# Push and deploy GitHub pages branch automatically
40-
auto-push: true
40+
auto-push: ${{ github.ref == 'refs/heads/main' }}
4141
# Show alert with commit comment on detecting possible performance regression
4242
alert-threshold: '125%'
43-
comment-on-alert: true
43+
comment-on-alert: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
4444
fail-on-alert: true
4545
alert-comment-cc-users: '@${{ github.actor }}'

0 commit comments

Comments
 (0)