-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (40 loc) · 1.15 KB
/
markdownlint.yml
File metadata and controls
46 lines (40 loc) · 1.15 KB
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
37
38
39
40
41
42
43
44
45
46
name: markdownlint
on:
push:
branches:
- '**'
pull_request:
branches:
- 'main'
jobs:
markdownlint:
name: Lint Markdown Files
permissions:
contents: write
statuses: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Run markdownlint
uses: DavidAnson/markdownlint-cli2-action@v19
with:
fix: true
config: '.markdownlint.json'
globs: 'docs/**/*.md'
continue-on-error: false
- name: Commit and push linting fixes
# Run only on:
# - Pull requests
# - Not on the default branch
if: >
github.event_name == 'pull_request' &&
github.ref_name != github.event.repository.default_branch
uses: stefanzweifel/git-auto-commit-action@v5
with:
branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }}
commit_message: "chore: fix linting issues"
commit_user_name: markdownlint[bot]
commit_user_email: markdownlint@bot.dev