# This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. # pulled from repo name: "Rubocop" on: pull_request: branches: [ "main" ] permissions: contents: read jobs: rubocop: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0 with: ruby-version: 2.7 bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Rubocop run run: | bash -c " bundle exec rubocop -P --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif [[ $? -ne 2 ]] " - name: Upload Sarif output uses: github/codeql-action/upload-sarif@v2 with: sarif_file: rubocop.sarif