高木のブログ

【GitHub Actions】rubocop-linter-actionからaction-rubocopに切り替えた

· 58 words · 1 minutes to read

GitHub Actionsでandrewmcodes-archive/rubocop-linter-action を使ってRuboCopを回していたけれど、いつの間にかコケるようになっていた

リポジトリを見に行ったらアーカイブになっていて、コケてる直接の原因は特定できていないけど、この際reviewdog/action-rubocop に切り替えることにした

name: Rubocop

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  rubocop:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: 2.7.3
    - name: Rubocop
      uses: reviewdog/action-rubocop@v1
      with:
        rubocop_version: gemfile
        rubocop_extensions: rubocop-rails:gemfile
        github_token: ${{ secrets.github_token }}
        reporter: github-pr-review

参考 🔗

GitHub Actions が RuboCop できないのはどう考えてもお前らが悪い!

Categories


Tags