-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.26 KB
/
call-markdown-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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
name: Lint markdown code
on:
workflow_call:
inputs:
runs-on:
required: true
type: string
environment-name:
default: k8s
required: true
type: string
continue-error:
default: false
required: true
type: boolean
lintprofile-path:
default: .markdownlint.rb
type: string
alpine-version:
default: 3.19.0
type: string
artifact-name:
default: md-lint
type: string
jobs:
lint-markdown:
runs-on: ${{ inputs.runs-on }}
container:
image: alpine:${{ inputs.alpine-version }}
environment: ${{ inputs.environment-name }}
continue-on-error: ${{ inputs.continue-error }}
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: '0'
- name: Install & Run Markdownlint
run: |
ls -lta
apk add --update --no-cache ruby-full && gem install mdl --no-document
mdl . -s ${{ inputs.lintprofile-path }} | tee ./${{ inputs.artifact-name }}.txt
- name: Upload linting results
uses: actions/[email protected]
with:
name: ${{ inputs.artifact-name }}
path: ${{ inputs.artifact-name }}.txt