Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix comment on PR action #11354

Merged
merged 1 commit into from Oct 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 5 additions & 8 deletions .github/workflows/benchmark-report.yml
Expand Up @@ -22,19 +22,16 @@ permissions:
jobs:
upload:
runs-on: ubuntu-latest
if: >
${{ github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' }}
if: github.event.workflow_run.conclusion == 'success'
steps:
- name: 'Download artifact'
uses: actions/github-script@v3.1.0
uses: actions/github-script@v3.1
with:
script: |
console.log(context)
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
run_id: ${{ github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "benchmark-assets"
Expand All @@ -46,11 +43,11 @@ jobs:
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/benchmark-assets.zip', Buffer.from(download.data));
fs.writeFileSync('${{ github.workspace }}/benchmark-assets.zip', Buffer.from(download.data));
- run: unzip benchmark-assets.zip

- name: 'Comment on PR'
uses: actions/github-script@v3
uses: actions/github-script@v3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down