From 4a94f8452ae3e1c57266388edf8094b94dbd1576 Mon Sep 17 00:00:00 2001 From: Lucille Delisle Date: Thu, 11 Jan 2024 18:27:55 +0100 Subject: [PATCH] use last version of action --- .github/workflows/comment_on_pr.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/comment_on_pr.yml b/.github/workflows/comment_on_pr.yml index 6bf37ac01f..ac0578b750 100644 --- a/.github/workflows/comment_on_pr.yml +++ b/.github/workflows/comment_on_pr.yml @@ -9,15 +9,15 @@ 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 }}, @@ -25,7 +25,7 @@ jobs: 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, @@ -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,