Skip to content
This repository was archived by the owner on May 10, 2025. It is now read-only.

Commit fcd5a92

Browse files
feat(workflow): Add reusable MarkdownLint workflow (#43)
* feat(workflow): Add reusable MarkdownLint workflow * introduce lint error to check job * revert "introduce lint error to check job" This reverts commit ce9137e.
1 parent ad68966 commit fcd5a92

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/workflows/lint-job.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ jobs:
2525
shellcheck:
2626
uses: ./.github/workflows/reusable-shellcheck.yaml
2727
secrets: inherit
28+
29+
markdownlint:
30+
uses: ./.github/workflows/reusable-markdownlint.yaml
31+
secrets: inherit
32+
with:
33+
markdownlint-cli-version: "0.41.0"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
3+
name: Reusable - Markdown Lint
4+
5+
on:
6+
workflow_call:
7+
inputs:
8+
node-version:
9+
description: "Node.js version"
10+
type: string
11+
required: false
12+
default: "latest"
13+
markdownlint-cli-version:
14+
description: "markdownlint-cli version"
15+
type: string
16+
required: false
17+
default: "latest"
18+
19+
jobs:
20+
release:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Generate Token
24+
uses: actions/create-github-app-token@3378cda945da322a8db4b193e19d46352ebe2de5 # v1.10.4
25+
id: app-token
26+
with:
27+
app-id: "${{ secrets.BOT_APP_ID }}"
28+
private-key: "${{ secrets.BOT_APP_PRIVATE_KEY }}"
29+
30+
- name: Checkout
31+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
32+
with:
33+
token: "${{ steps.app-token.outputs.token }}"
34+
35+
- name: Install Node.js
36+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
37+
with:
38+
node-version: "${{ inputs.node-version }}"
39+
40+
- name: Install markdownlint-cli
41+
run: npm install -g markdownlint-cli@${{ inputs.markdownlint-cli-version }}
42+
43+
- name: Run markdownlint
44+
run: find . -name "*.md" -exec markdownlint {} +

0 commit comments

Comments
 (0)