Skip to content

Commit

Permalink
[CLEANUP]: Update PR Comment, with github-script
Browse files Browse the repository at this point in the history
  • Loading branch information
demetribu committed Aug 26, 2023
1 parent dfe7ca6 commit 6f7700d
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,28 @@ jobs:
path: benchmark-reports.tgz
retention-days: 30

- name: PR Comment
uses: github-actions-up-and-running/[email protected]
if: ${{ github.event_name == 'pull_request' }}
- name: Comment PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message: |
<details>
<summary>BENCHMARK_REPORT</summary>
```
${{ env.BENCHMARK_REPORT }}
```
</details>
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issue_number = context.issue.number;
const owner = context.repo.owner;
const repo = context.repo.repo;
const body = `
<details>
<summary>BENCHMARK_REPORT</summary>
```
${process.env.BENCHMARK_REPORT}
```
</details>
`;
github.rest.issues.createComment({
issue_number,
owner,
repo,
body
});

0 comments on commit 6f7700d

Please sign in to comment.