This commit is contained in:
lordwelch 2022-01-16 20:05:58 -08:00
parent 4047863c54
commit aff31b6d0a

View File

@ -53,9 +53,29 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- uses: actions/download-artifact@v2
- name: 'Download artifact'
uses: actions/github-script@v5
with:
name: isort.out
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "isort.diff"
})[0];
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/isort.diff.zip`, Buffer.from(download.data));
- name: 'Unzip artifact'
run: unzip isort.diff.zip
- uses: reviewdog/action-setup@v1
- name: Run reviewdog