-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (32 loc) · 895 Bytes
/
lint.yaml
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
36
name: Lint YAML files
on:
pull_request:
paths:
- '**.yaml'
- '**.yml'
jobs:
yamllint:
runs-on: ubuntu-24.04
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Get changed YAML files
uses: dorny/paths-filter@v3
id: filter
with:
list-files: shell
token: ${{ secrets.GITHUB_TOKEN }}
filters: |
yaml:
- added|modified: '**.yaml'
- added|modified: '**.yml'
- name: Lint YAML files
if: steps.filter.outputs.yaml == 'true'
uses: reviewdog/action-yamllint@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
yamllint_flags: "-c .github/lint/.yamllint.yaml"
reporter: github-pr-review
filter_mode: added
workdir: ${{ github.workspace }}
fail_on_error: true