Merge pull request #4602 from ShE3py/automaton #4484
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: Lint | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
merge_group: | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Setup Ruby | |
uses: ruby/setup-ruby@1287d2b408066abada82d5ad1c63652e758428d9 # v1.214.0 | |
with: | |
bundler-cache: true | |
- name: Run linters | |
if: ${{ github.event_name != 'merge_group' }} | |
uses: wearerequired/lint-action@548d8a7c4b04d3553d32ed5b6e91eb171e10e7bb # v2 | |
with: | |
auto_fix: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == github.repository_owner }} | |
rubocop: true | |
rubocop_command_prefix: bundle exec | |
- name: Skip with successful status | |
if: ${{ github.event_name == 'merge_group' }} | |
run: exit 0 |