Skip to content

Commit 1a59d44

Browse files
fix(ci): pass benchmark summary via env var to avoid backtick-in-template-literal JS error
1 parent b4c197b commit 1a59d44

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/benchmark.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,13 @@ jobs:
112112
- name: Post PR comment
113113
if: always() && github.event_name == 'pull_request'
114114
uses: actions/github-script@v7
115+
env:
116+
BENCH_EXIT_CODE: ${{ steps.bench.outputs.exit_code }}
117+
BENCH_SUMMARY: ${{ steps.bench.outputs.summary }}
115118
with:
116119
script: |
117-
const exitCode = '${{ steps.bench.outputs.exit_code }}';
118-
const summary = `${{ steps.bench.outputs.summary }}`;
120+
const exitCode = process.env.BENCH_EXIT_CODE || '0';
121+
const summary = process.env.BENCH_SUMMARY || '';
119122
const passed = exitCode === '0';
120123
const icon = passed ? '✅' : '❌';
121124
const headline = passed

0 commit comments

Comments
 (0)