mirror of
https://github.com/The-OpenROAD-Project/OpenROAD.git
synced 2026-06-13 00:36:57 +08:00
Bumps [actions/github-script](https://github.com/actions/github-script) from 6 to 8. - [Release notes](https://github.com/actions/github-script/releases) - [Commits](https://github.com/actions/github-script/compare/v6...v8) --- updated-dependencies: - dependency-name: actions/github-script dependency-version: '8' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
38 lines
1.4 KiB
YAML
38 lines
1.4 KiB
YAML
name: Post clang-tidy review comments
|
|
|
|
on:
|
|
workflow_run:
|
|
# The name field of the lint action .github/workflows/github-actions-clang-tidy.yml
|
|
workflows: ["clang-tidy-review"]
|
|
types:
|
|
- completed
|
|
|
|
jobs:
|
|
Clang-Tidy-Post:
|
|
runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }}
|
|
steps:
|
|
# Downloads the artifact uploaded by the lint action
|
|
- name: 'Download artifact'
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
run_id: ${{github.event.workflow_run.id }},
|
|
});
|
|
const matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
|
return artifact.name == "clang-tidy-review"
|
|
})[0];
|
|
const download = await github.rest.actions.downloadArtifact({
|
|
owner: context.repo.owner,
|
|
repo: context.repo.repo,
|
|
artifact_id: matchArtifact.id,
|
|
archive_format: 'zip',
|
|
});
|
|
const fs = require('fs');
|
|
fs.writeFileSync('${{github.workspace}}/clang-tidy-review.zip', Buffer.from(download.data));
|
|
- name: 'Unzip artifact'
|
|
run: unzip clang-tidy-review.zip
|
|
- uses: The-OpenROAD-Project/clang-tidy-review/post@master
|