blob: b3a3c4e447332e3965bcece135113cd71336aefe [file] [log] [blame]
# Copyright lowRISC contributors.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0
name: pr-lint-review
on:
workflow_run:
workflows: ["pr-trigger"]
types:
- completed
jobs:
review_triggered:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
# this workflow does not run in a PR context
# download 'event.json' and concatenated verible config files
# from a PR-tiggered workflow to mock the PR context and make
# a review
- name: 'Download artifact'
id: get-artifacts
uses: actions/github-script@v3.1.0
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "verible_input"
})[0];
var download = await github.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
var fs = require('fs');
fs.writeFileSync('${{github.workspace}}/verible_input.zip', Buffer.from(download.data));
- run: |
unzip verible_input.zip
- name: Show config
run: |
cat verible_config
- name: Show waiver
run: |
cat verible_waiver
- name: Run Verible linter action
uses: chipsalliance/verible-linter-action@main
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
suggest_fixes: 'false'
config_file: 'verible_config'
extra_args: "--waiver_files=verible_waiver"