diff --git a/.github/workflows/ci-performance-benchmarks.yaml b/.github/workflows/ci-performance-benchmarks.yaml index 23f1e1cc44..d15f02af17 100644 --- a/.github/workflows/ci-performance-benchmarks.yaml +++ b/.github/workflows/ci-performance-benchmarks.yaml @@ -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 }}