diff --git a/action.yml b/action.yml index 6eca32b..540da3d 100644 --- a/action.yml +++ b/action.yml @@ -1,4 +1,3 @@ - name: 'StandardRB Action' description: 'A GitHub Action that lints your Ruby code with StandardRB!' author: 'Andrew Mason ' @@ -15,9 +14,13 @@ runs: with: ruby-version: ${{ inputs.ruby-version }} bundler: none - - name: Install standard + - name: Install standard and standard-rails shell: bash - run: gem install standard:$(awk '/standard \(/ {sub(/\(/, ""); sub(/\)/, ""); print $2; exit}' Gemfile.lock) + run: | + gem install standard:$(awk '/standard \(/ {sub(/\(/, ""); sub(/\)/, ""); print $2; exit}' Gemfile.lock) + if grep -q "standard-rails" Gemfile.lock; then + gem install standard-rails:$(awk '/standard-rails \(/ {sub(/\(/, ""); sub(/\)/, ""); print $2; exit}' Gemfile.lock) + fi - name: Run standard shell: bash run: standardrb --parallel -f github