File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,23 @@ jobs:
8383 runs-on : ubuntu-latest
8484 steps :
8585 - uses : actions/checkout@v2
86+ - name : Get changed files
87+ id : changed-files
88+ uses : tj-actions/changed-files@v39
89+ with :
90+ files : |
91+ **/*.rb
8692 - name : Set up Ruby
93+ if : steps.changed-files.outputs.any_changed == 'true'
8794 uses : ruby/setup-ruby@v1
8895 with :
8996 ruby-version : ${{ env.RUBY_VERSION }}
9097 - name : Install dependencies
98+ if : steps.changed-files.outputs.any_changed == 'true'
9199 run : bundle install
92100 - name : Run RuboCop
93- run : bundle exec rake rubocop
101+ if : steps.changed-files.outputs.any_changed == 'true'
102+ run : bundle exec rubocop ${{ steps.changed-files.outputs.all_changed_files }}
94103
95104 tests :
96105 permissions : write-all
You can’t perform that action at this time.
0 commit comments