Skip to content

Commit

Permalink
Merge pull request #12 from lldelisle/add_workflow_summary
Browse files Browse the repository at this point in the history
use last version of action
  • Loading branch information
lldelisle authored Jan 11, 2024
2 parents 8fef005 + 4a94f84 commit 676d9bc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/comment_on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@ on:
- completed

jobs:
upload:
download_and_comment:
runs-on: ubuntu-latest
if: github.event.workflow_run.event == 'pull_request'
steps:
- name: 'Download artifact'
uses: actions/github-script@v3.1.0
uses: actions/github-script@v7
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == 'All tool test results'
})[0];
var download = await github.actions.downloadArtifact({
var download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
Expand All @@ -35,13 +35,13 @@ jobs:
fs.writeFileSync('${{github.workspace}}/upload.zip', Buffer.from(download.data));
- run: unzip upload.zip
- name: 'Comment on PR'
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var fs = require('fs');
var issue_number = Number(fs.readFileSync('./NR'));
await github.issues.createComment({
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue_number,
Expand Down

0 comments on commit 676d9bc

Please sign in to comment.