forked from reclaim-the-stack/rubocop-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
28 lines (28 loc) · 981 Bytes
/
action.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
name: Reclaim The Stack - Rubocop
description: Runs rubocop and posts offences as inline PR comments.
inputs:
failure_exit_code:
description: Exit code after running rubocop-- a non-zero exit code will fail the build
default: "108"
github_token:
description: GITHUB_TOKEN
default: ${{ github.token }}
gem_versions:
description: Gem versions to install
default: rubocop:1.54.1 rubocop-rails:2.20.2 rubocop-rspec:2.22.0
outside_diff:
description: Log offences found outside of PR diff
default: "true"
rubocop_arguments:
description: Arguments passed to rubocop cli
default: ""
runs:
using: composite
steps:
- run: ruby $GITHUB_ACTION_PATH/rubocop.rb ${{ inputs.rubocop_arguments }}
shell: bash
env:
FAILURE_EXIT_CODE: ${{ inputs.failure_exit_code }}
GITHUB_TOKEN: ${{ inputs.github_token }}
OUTSIDE_DIFF: ${{ inputs.outside_diff }}
RUBOCOP_GEM_VERSIONS: ${{ inputs.gem_versions }}