From 240e4eb0d71318377062aa9011fec702676a8ddc Mon Sep 17 00:00:00 2001 From: Md Armughanuddin Date: Thu, 13 Jun 2024 00:00:16 -0500 Subject: [PATCH] Updated comment action --- .github/workflows/jmh-benchmark.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/jmh-benchmark.yml b/.github/workflows/jmh-benchmark.yml index 9e59a448e1..fdbf4cc388 100644 --- a/.github/workflows/jmh-benchmark.yml +++ b/.github/workflows/jmh-benchmark.yml @@ -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