-
-
Notifications
You must be signed in to change notification settings - Fork 43
46 lines (46 loc) · 967 Bytes
/
rubocop.yml
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
name: "RuboCop"
on:
push:
branches:
- "main"
- "master"
paths:
- "**/*.rb"
- "**/*.rake"
- "Rakefile"
- "Gemfile*"
- ".rubocop.yml"
pull_request:
branches:
- "main"
- "master"
types:
- "opened"
- "synchronize"
workflow_dispatch:
jobs:
run:
runs-on: ubuntu-latest
name: ${{ matrix.type }}
strategy:
fail-fast: false
matrix:
type: ["Style", "Layout", "Naming", "Lint", "Metrics", "Security"]
steps:
- name: Clone
uses: actions/checkout@v2
- name: Get git diff
id: get_diff
uses: technote-space/get-diff-action@v4
with:
PATTERNS: |
**/*.rb
**/*.rake
Gemfile
Rakefile
- name: Check ${{ matrix.type }}
uses: action-hero/actions/rubocop@main
if: ${{ env.GIT_DIFF != '' }}
with:
diff: ${{ env.GIT_DIFF }}
type: ${{ matrix.type }}