This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #932 from gitcoindev/refactor-knip-to-run-on-pull-…
…request-event chore: update knip configuration to run on pull_request
- Loading branch information
Showing
2 changed files
with
51 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Knip-reporter | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Knip"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
knip-reporter: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: knip-results | ||
run-id: ${{ github.event.workflow_run.id }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Read pr number | ||
id: pr-number | ||
uses: juliangruber/read-file-action@v1 | ||
with: | ||
path: ./pr-number.txt | ||
trim: true | ||
|
||
- name: Report knip results to pull request | ||
if: ${{ github.event.workflow_run.conclusion != 'success' }} | ||
uses: gitcoindev/knip-reporter@main | ||
with: | ||
verbose: true | ||
comment_id: ${{ github.workflow }}-reporter | ||
command_script_name: knip-ci | ||
annotations: true | ||
ignore_results: false | ||
json_input: true | ||
json_input_file_name: knip-results.json | ||
pull_request_number: ${{ steps.pr-number.outputs.content }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters