-
Notifications
You must be signed in to change notification settings - Fork 1
31 lines (29 loc) · 949 Bytes
/
markdown-lint.yml
File metadata and controls
31 lines (29 loc) · 949 Bytes
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
name: Markdown Lint
on:
push:
branches:
- "main" # run when push happens on all branches
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Get file changes
id: get_file_changes
uses: trilom/file-changes-action@v1.2.4
with:
output: ' '
- name: Echo changed files
run: |
echo Changed files: ${{ steps.get_file_changes.outputs.files }}
- name: Get only md files
id: get_md_changes
run: |
echo -e "::set-output name=files::\c";echo "${{ steps.get_file_changes.outputs.files }}" | for i in $(cat) ; do if [[ $i == *.md ]]; then echo -e "$i \c"; fi ;done
- name: markdownlint-cli
if: ${{ steps.get_md_changes.outputs.files}}
uses: nosborn/github-action-markdown-cli@v3.2.0
with:
files: ${{ steps.get_md_changes.outputs.files}}
config_file: ".markdownlint"