Bump github/codeql-action from 2 to 3 #41
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
# License: LGPL-3.0-or-later | |
name: Code scanning | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: [opened, reopened, synchronize] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
standard: | |
name: StandardRb | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
security-events: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.7 | |
bundler-cache: true | |
- name: Allow adding the code-scanning-rubocop gem | |
run: bundle config unset deployment | |
- name: Install Code Scanning integration | |
run: bundle add code-scanning-rubocop --skip-install | |
- name: Install dependencies | |
run: bundle install | |
- name: Standardrb run | |
run: | | |
bash -c " | |
bundle exec standardrb --require code_scanning --format CodeScanning::SarifFormatter -o standard.sarif | |
[[ $? -ne 2 ]] | |
" | |
- name: Upload Sarif output | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: standard.sarif |