Extend Rubocop workflow to allow setting of Github token #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run RuboCop | ||
on: | ||
workflow_call: | ||
secrets: | ||
BUNDLER_GITHUB_TOKEN: | ||
required: false | ||
description: "Token used for Bundler to authenticate when installing gems from private Github repos" | ||
jobs: | ||
run-rubocop: | ||
name: Run RuboCop | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
show-progress: false | ||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
bundler-cache: true | ||
env: | ||
BUNDLE_GITHUB__COM: "x-access-token:${{ secrets.BUNDLER_GITHUB_TOKEN }}" | ||
- name: Run RuboCop | ||
run: bundle exec rubocop --parallel --format github --format progress |