Skip to content

Commit 7572619

Browse files
committed
.
1 parent e46e07e commit 7572619

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/pr_criterion.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ jobs:
99
name: run benchmark
1010
permissions:
1111
pull-requests: write
12-
runs-on: ${{ github.event_name == 'pull_request' && 'self-hosted' || 'ubuntu-latest' }}
12+
runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'self-hosted' }}
1313
if: |
1414
${{
1515
github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'performance') ||
1616
github.event_name == 'push'
1717
}}
18+
env:
19+
BRANCH_NAME: ${{ github.event_name == 'pull_request' && github.base_ref || 'HEAD~1' }}
1820
steps:
1921
- uses: actions/checkout@v4
2022
- uses: arduino/setup-protoc@v3
@@ -26,14 +28,14 @@ jobs:
2628
- uses: boa-dev/criterion-compare-action@v3
2729
with:
2830
cwd: opentelemetry
29-
branchName: ${{ github.base_ref }}
31+
branchName: ${{ env.BRANCH_NAME }}
3032
- uses: boa-dev/criterion-compare-action@v3
3133
with:
3234
cwd: opentelemetry-appender-tracing
3335
features: spec_unstable_logs_enabled
34-
branchName: ${{ github.base_ref }}
36+
branchName: ${{ env.BRANCH_NAME }}
3537
- uses: boa-dev/criterion-compare-action@v3
3638
with:
3739
cwd: opentelemetry-sdk
3840
features: rt-tokio,testing,metrics,logs,spec_unstable_metrics_views
39-
branchName: ${{ github.base_ref }}
41+
branchName: ${{ env.BRANCH_NAME }}

0 commit comments

Comments
 (0)