2022-08-28 13:32:07 +02:00
|
|
|
---
|
|
|
|
name: Post clang-tidy review comments
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_run:
|
|
|
|
workflows: ["Build"]
|
|
|
|
types:
|
|
|
|
- completed
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
2023-01-15 17:27:41 +01:00
|
|
|
- name: "Download artifact"
|
2022-08-28 13:32:07 +02:00
|
|
|
uses: actions/github-script@v6
|
|
|
|
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));
|
2023-01-15 17:27:41 +01:00
|
|
|
- name: "Unzip artifact"
|
2022-08-28 13:32:07 +02:00
|
|
|
run: unzip clang-tidy-review.zip
|
|
|
|
|
2022-10-29 11:47:27 +02:00
|
|
|
- uses: ZedThree/clang-tidy-review/post@v0.10.1
|
2022-08-28 13:32:07 +02:00
|
|
|
id: review
|
2023-01-26 19:47:32 +01:00
|
|
|
with:
|
|
|
|
lgtm_comment_body: ""
|