mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-08 00:39:48 -06:00
/.github/workflows/ci-performance-benchmarks.yaml: get results with javascript
This commit is contained in:
26
.github/workflows/ci-performance-benchmarks.yaml
vendored
26
.github/workflows/ci-performance-benchmarks.yaml
vendored
@@ -87,24 +87,24 @@ jobs:
|
||||
run: |
|
||||
echo "Get benchmark results here: $KEY"
|
||||
aws s3api get-object --bucket=performance-benchmarking-github-actions-results --key="$KEY" results.log
|
||||
results=$(cat results.log)
|
||||
|
||||
results="${results//$'\n'/'%0A'}"
|
||||
echo "::set-output name=results::$results"
|
||||
env:
|
||||
KEY: ${{ steps.run-benchmarks.outputs.object-key }}
|
||||
- name: View context attributes
|
||||
- name: Post results to PR
|
||||
uses: actions/github-script@v3
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
console.log("This is body:", process.env.BODY)
|
||||
github.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `@${process.env.ACTOR}\n ${process.env.BODY}`
|
||||
})
|
||||
fs = require('fs');
|
||||
fs.readFile(`${process.env.GITHUB_WORKSPACE}/results.log`, 'utf8', function (err,data) {
|
||||
if (err) {
|
||||
return console.log(err);
|
||||
}
|
||||
return github.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `@${process.env.ACTOR}\n ${data}`
|
||||
});
|
||||
});
|
||||
env:
|
||||
BODY: ${{ steps.get-results.outputs.results }}
|
||||
ACTOR: ${{ github.actor }}
|
||||
|
||||
Reference in New Issue
Block a user