-
Notifications
You must be signed in to change notification settings - Fork 12.8k
35 lines (29 loc) · 919 Bytes
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Lint
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
merge_group:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Setup Ruby
uses: ruby/setup-ruby@a2bbe5b1b236842c1cb7dd11e8e3b51e0a616acc # v1
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