-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
51 lines (46 loc) · 1.67 KB
/
action.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
name: 'Markdownlint'
description: 'Execute markdownlint'
inputs:
linters:
description: 'List of all enabled linters'
required: true
ssh-key:
description: 'ssh key'
required: true
github_token:
description: 'github token'
required: true
runs:
using: "composite"
steps:
- id: check
shell: bash
run: if echo "${{ inputs.linters }}" | grep MARKDOWNLINT &> /dev/null; then echo "continue=true" >> "${GITHUB_OUTPUT}"; else echo "continue=false" >> "${GITHUB_OUTPUT}"; fi
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
if: ${{ steps.check.outputs.continue == 'true' }}
with:
ssh-key: ${{ inputs.ssh-key }}
persist-credentials: true
lfs: true
submodules: recursive
- shell: bash
if: ${{ steps.check.outputs.continue == 'true' }}
run: |
grep path .gitmodules | grep -v scripts | awk '{ print $3 }' | xargs rm -rf || true
find . -type d -name vendor -exec rm -rf {} \; || true
find . -type d -name node_modules -exec rm -rf {} \; || true
find . -type d -name Libraries -exec rm -rf {} \; || true
# https://github.com/marketplace/actions/run-markdownlint-with-reviewdog
- uses: reviewdog/action-markdownlint@v0
if: ${{ steps.check.outputs.continue == 'true' }}
with:
fail_on_error: true
filter_mode: nofilter
github_token: ${{ inputs.github_token }}
level: info
# https://github.com/igorshubovych/markdownlint-cli
markdownlint_flags: ". --ignore '{**/vendor/**,**/node_modules/**,**/Libraries/**}'"
reporter: github-pr-review
# reviewdog_flags: