Skip to content

Commit

Permalink
Trying to install standard-rails if it's available
Browse files Browse the repository at this point in the history
  • Loading branch information
willtcarey committed Aug 26, 2024
1 parent e466e02 commit 15368d7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

name: 'StandardRB Action'
description: 'A GitHub Action that lints your Ruby code with StandardRB!'
author: 'Andrew Mason <[email protected]>'
Expand All @@ -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
Expand Down

0 comments on commit 15368d7

Please sign in to comment.