From 5327cbffaaec6bdc6a1a09126142289485cba44c Mon Sep 17 00:00:00 2001 From: mrjvs Date: Fri, 10 Mar 2023 19:38:59 +0100 Subject: [PATCH] update annotate download script to use v6 --- .github/workflows/linting_annotate.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linting_annotate.yml b/.github/workflows/linting_annotate.yml index c250fd03..f0482501 100644 --- a/.github/workflows/linting_annotate.yml +++ b/.github/workflows/linting_annotate.yml @@ -21,21 +21,21 @@ jobs: uses: actions/github-script@v6 with: script: | - var artifacts = await github.actions.listWorkflowRunArtifacts({ + const 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) => { + const matchArtifact = artifacts.data.artifacts.filter((artifact) => { return artifact.name == "eslint_report.json" })[0]; - var download = await github.actions.downloadArtifact({ + const download = await github.rest.actions.downloadArtifact({ owner: context.repo.owner, repo: context.repo.repo, artifact_id: matchArtifact.id, archive_format: 'zip', }); - var fs = require('fs'); + const fs = require('fs'); fs.writeFileSync('${{github.workspace}}/eslint_report.zip', Buffer.from(download.data)); - run: unzip eslint_report.zip