mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-26 17:31:50 +01:00
update annotate download script to use v6
This commit is contained in:
parent
695ccef2b5
commit
5327cbffaa
8
.github/workflows/linting_annotate.yml
vendored
8
.github/workflows/linting_annotate.yml
vendored
@ -21,21 +21,21 @@ jobs:
|
|||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
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) => {
|
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||||
return artifact.name == "eslint_report.json"
|
return artifact.name == "eslint_report.json"
|
||||||
})[0];
|
})[0];
|
||||||
var download = await github.actions.downloadArtifact({
|
const download = await github.rest.actions.downloadArtifact({
|
||||||
owner: context.repo.owner,
|
owner: context.repo.owner,
|
||||||
repo: context.repo.repo,
|
repo: context.repo.repo,
|
||||||
artifact_id: matchArtifact.id,
|
artifact_id: matchArtifact.id,
|
||||||
archive_format: 'zip',
|
archive_format: 'zip',
|
||||||
});
|
});
|
||||||
var fs = require('fs');
|
const fs = require('fs');
|
||||||
fs.writeFileSync('${{github.workspace}}/eslint_report.zip', Buffer.from(download.data));
|
fs.writeFileSync('${{github.workspace}}/eslint_report.zip', Buffer.from(download.data));
|
||||||
|
|
||||||
- run: unzip eslint_report.zip
|
- run: unzip eslint_report.zip
|
||||||
|
Loading…
Reference in New Issue
Block a user