-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (57 loc) · 1.75 KB
/
reviewdog.yml
File metadata and controls
60 lines (57 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: "Reusable Reviewdog Workflow"
on:
workflow_call:
inputs:
reviewdog_app_id:
description: "GitHub App ID for Reviewdog"
required: true
type: string
reviewdog_private_key:
description: "GitHub App private key for Reviewdog"
required: true
type: string
reporter:
description: "Reviewdog reporter (e.g., github-pr-review)"
required: false
type: string
default: "github-pr-review"
filter_mode:
description: "Filter mode (e.g., added, diff_context)"
required: false
type: string
default: "added"
tool_name:
description: "Name of the linter tool"
required: false
type: string
default: ""
tool_command:
description: "Command to run the linter"
required: true
type: string
secrets:
REVIEWDOG_APP_ID:
required: true
REVIEWDOG_PRIVATE_KEY:
required: true
jobs:
reviewdog:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Token
id: get_token
uses: peter-murray/workflow-application-token-action@v4
with:
application_id: ${{ secrets.REVIEWDOG_APP_ID }}
application_private_key: ${{ secrets.REVIEWDOG_PRIVATE_KEY }}
organization: ${{ github.repository_owner }}
- name: Run reviewdog
uses: reviewdog/action@v0.20.3
with:
github_token: ${{ steps.get_token.outputs.token }}
reporter: ${{ inputs.reporter }}
filter_mode: ${{ inputs.filter_mode }}
tool_name: ${{ inputs.tool_name }}
reviewdog_cmd: ${{ inputs.tool_command }}