File tree Expand file tree Collapse file tree 1 file changed +21
-7
lines changed
Expand file tree Collapse file tree 1 file changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,24 @@ jobs:
2020 with :
2121 bundler-cache : true
2222
23- - name : Run linters
24- uses : wearerequired/lint-action@548d8a7c4b04d3553d32ed5b6e91eb171e10e7bb # v2
25- if : ${{ github.event_name == 'pull_request_target' }}
26- with :
27- auto_fix : true
28- rubocop : true
29- rubocop_command_prefix : bundle exec
23+ - name : Run RuboCop with auto-correct
24+ run : |
25+ bundle exec rubocop -A
26+
27+ - name : Check for changes
28+ id : changes
29+ run : |
30+ git config --global user.name "github-actions[bot]"
31+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
32+ if git status --porcelain | grep .; then
33+ echo "changes=true" >> $GITHUB_ENV
34+ else
35+ echo "changes=false" >> $GITHUB_ENV
36+ fi
37+
38+ - name : Commit and push changes
39+ if : env.changes == 'true'
40+ run : |
41+ git add .
42+ git commit -m "chore: auto-corrected with RuboCop"
43+ git push
You can’t perform that action at this time.
0 commit comments