diff --git a/.github/workflows/publish_pr.yml b/.github/workflows/publish_pr.yml index da3e291..f194bfd 100644 --- a/.github/workflows/publish_pr.yml +++ b/.github/workflows/publish_pr.yml @@ -20,7 +20,7 @@ "script": "const pull_requests = ${{ toJSON(github.event.workflow_run.pull_requests) }};\nif (!pull_requests.length) {\n return core.error(\"This workflow doesn't match any pull requests!\");\n}\nlet allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({\n owner: context.repo.owner,\n repo: context.repo.repo,\n run_id: context.payload.workflow_run.id,\n});\nlet matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {\n return artifact.name == \"artifacts\"\n})[0];\nlet download = await github.rest.actions.downloadArtifact({\n owner: context.repo.owner,\n repo: context.repo.repo,\n artifact_id: matchArtifact.id,\n archive_format: 'zip',\n});\nlet fs = require('fs');\nfs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/repo.zip`, Buffer.from(download.data));" }, "name": "Download Artifacts", - "uses": "actions/github-script@v6" + "uses": "actions/github-script@v7" }, { "name": "Unpack Artifacts",