Skip to content

Commit

Permalink
Updated JMH Benchmark Comment Action (#976)
Browse files Browse the repository at this point in the history
Replaced existing action with
[actions/github-script@v7](https://github.com/marketplace/actions/github-script)
  • Loading branch information
armughan11 committed Jun 13, 2024
1 parent ab5972a commit 9860ab2
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/jmh-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,20 @@ jobs:
(echo 'Main Branch:'; echo '```' ; cat main_text.txt; echo '```'; echo 'With This PR:'; echo '```' ; cat pr_text.txt; echo '```') > benchmark.txt
- name: Comment Benchmark
uses: mshick/add-pr-comment@v2
if: always() # This step is for adding the comment
with:
message-path: benchmark.txt # The path to the message file to leave as a comment
message-id: benchmark
uses: actions/github-script@v7
if: always()
with:
script: |
const fs = require('fs');
const path = 'benchmark.txt';
const output = fs.readFileSync(path, 'utf8');
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
});
- name: Stop VM
if: always()
run: gcloud compute instances stop nullway-jmh --zone=us-central1-a
Expand Down

0 comments on commit 9860ab2

Please sign in to comment.