Skip to content

Commit

Permalink
Publish comment on PR
Browse files Browse the repository at this point in the history
  • Loading branch information
camposandro committed Jul 28, 2023
1 parent 2e15cfd commit dc0b583
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion .github/workflows/asv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,18 @@ jobs:
path: ~/.cache/pip
key: ${{ runner.os }}-pip
- name: Run comparison against main branch
run: asv compare --config $ASV_CONFIG_FILE -v main HEAD
run: asv compare --config $ASV_CONFIG_FILE main HEAD > results.txt
- name: Publish comment to PR
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const comment = fs.readFileSync('results.txt', 'utf-8');
const { data } = await github.issues.createComment({
...context.repo,
issue_number: context.issue.number,
body: comment,
});
console.log("Comment published:", data.html_url);

0 comments on commit dc0b583

Please sign in to comment.