Skip to content

Commit d957d70

Browse files
authored
feat: Add rumdl (#85)
Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>
1 parent abbfc98 commit d957d70

File tree

10 files changed

+107
-49
lines changed

10 files changed

+107
-49
lines changed

.github/workflows/_validate.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ jobs:
2020
uses: ./.github/workflows/validate-gh-workflows.yaml
2121
with:
2222
auto_doc: true
23-
markdownlint: true
2423
shellcheck: true
2524
yamlfmt: true
25+
rumdl: true

.github/workflows/validate-gh-action.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ on:
88
type: boolean
99
required: false
1010
default: false
11-
markdownlint:
12-
description: If markdownlint should be run.
13-
type: boolean
14-
required: false
15-
default: false
1611
shellcheck:
1712
description: If shellcheck should be run.
1813
type: boolean
@@ -23,6 +18,16 @@ on:
2318
type: boolean
2419
required: false
2520
default: false
21+
rumdl:
22+
description: If rumdl should be run.
23+
type: boolean
24+
required: false
25+
default: false
26+
markdownlint:
27+
description: DEPRECATED - If markdownlint should be run.
28+
type: boolean
29+
required: false
30+
default: false
2631

2732
jobs:
2833
validate:

.github/workflows/validate-gh-workflows.yaml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ on:
1212
description: The script to run auto-doc.
1313
type: string
1414
required: false
15-
markdownlint:
16-
description: If markdownlint should be run.
17-
type: boolean
18-
required: false
19-
default: false
2015
shellcheck:
2116
description: If shellcheck should be run.
2217
type: boolean
@@ -27,6 +22,16 @@ on:
2722
type: boolean
2823
required: false
2924
default: false
25+
rumdl:
26+
description: If rumdl should be run.
27+
type: boolean
28+
required: false
29+
default: false
30+
markdownlint:
31+
description: DEPRECATED - If markdownlint should be run.
32+
type: boolean
33+
required: false
34+
default: false
3035

3136
jobs:
3237
validate:
@@ -82,7 +87,7 @@ jobs:
8287
name="$(basename "${file}" .yaml)"
8388
8489
tmp_readme="$(mktemp)"
85-
printf '## Inputs\n## Outputs' >"${tmp_readme}"
90+
printf '## Secrets\n\n## Inputs\n\n## Outputs' >"${tmp_readme}"
8691
auto-doc --colMaxWords 100 --repository ${{ github.repository }} --reusable --reusableOutputColumns "Output" --reusableOutputColumns "Description" --filename "${file}" --output "${tmp_readme}"
8792
sed -i 's/## /### /g' "${tmp_readme}"
8893
sed -i 's/||/\\|\\|/g' "${tmp_readme}"

.markdownlint.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.rumdl.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[global]
2+
disable = ["MD028", "MD013"]
3+
4+
[per-file-ignores]
5+
".github/pull_request_template.md" = ["MD041"]
6+
7+
[MD024]
8+
siblings-only = true
9+
10+
[MD033]
11+
allowed-elements = ["br", "details", "summary", "sub", "sup"]
12+
13+
[MD052]
14+
shortcut-syntax = true

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515

1616
## [UNRELEASED]
1717

18+
## [v0.8.0] - 2026-02-10
19+
20+
### Added
21+
22+
- Add support to lint markdown with [rumdl](https://github.com/rvben/rumdl) via the new `rumdl` input. ([#85](https://github.com/action-stars/generic-workflows/pull/85)) _@stevehipwell_
23+
1824
### Changed
1925

2026
- Update _actions/checkout_ from `6.0.0` to `6.0.1`. ([#80](https://github.com/action-stars/generic-workflows/pull/80)) _@dependabot_
@@ -222,7 +228,8 @@
222228
<!--
223229
RELEASES
224230
-->
225-
[UNRELEASED]: https://github.com/action-stars/generic-workflows/compare/v0.7.4...HEAD
231+
[UNRELEASED]: https://github.com/action-stars/generic-workflows/compare/v0.8.0...HEAD
232+
[v0.8.0]: https://github.com/action-stars/generic-workflows/releases/tag/v0.8.0
226233
[v0.7.4]: https://github.com/action-stars/generic-workflows/releases/tag/v0.7.4
227234
[v0.7.3]: https://github.com/action-stars/generic-workflows/releases/tag/v0.7.3
228235
[v0.7.2]: https://github.com/action-stars/generic-workflows/releases/tag/v0.7.2

README.md

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,18 @@
88
This GitHub Actions workflow generates a changelog for Dependabot.
99

1010
<!-- MERGE:START:dependabot-changelog - Do not remove or modify this section -->
11+
### Secrets
12+
13+
<!-- AUTO-DOC-SECRETS:START - Do not remove or modify this section -->
14+
No secrets.
15+
<!-- AUTO-DOC-SECRETS:END -->
16+
1117
### Inputs
1218

1319
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
1420
No inputs.
1521
<!-- AUTO-DOC-INPUT:END -->
22+
1623
### Outputs
1724

1825
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
@@ -25,6 +32,12 @@ No outputs.
2532
This GitHub Actions workflow publishes a release.
2633

2734
<!-- MERGE:START:release - Do not remove or modify this section -->
35+
### Secrets
36+
37+
<!-- AUTO-DOC-SECRETS:START - Do not remove or modify this section -->
38+
No secrets.
39+
<!-- AUTO-DOC-SECRETS:END -->
40+
2841
### Inputs
2942

3043
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
@@ -37,6 +50,7 @@ This GitHub Actions workflow publishes a release.
3750
| version | string | false | `"${{ github.ref_name }}"` | The version to be released. |
3851

3952
<!-- AUTO-DOC-INPUT:END -->
53+
4054
### Outputs
4155

4256
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
@@ -49,6 +63,12 @@ No outputs.
4963
This GitHub Actions workflow runs the OSSF Scorecard.
5064

5165
<!-- MERGE:START:scorecard - Do not remove or modify this section -->
66+
### Secrets
67+
68+
<!-- AUTO-DOC-SECRETS:START - Do not remove or modify this section -->
69+
No secrets.
70+
<!-- AUTO-DOC-SECRETS:END -->
71+
5272
### Inputs
5373

5474
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
@@ -58,6 +78,7 @@ This GitHub Actions workflow runs the OSSF Scorecard.
5878
| retention_days | number | false | `7` | Number of days to retain the scorecard artifact. |
5979

6080
<!-- AUTO-DOC-INPUT:END -->
81+
6182
### Outputs
6283

6384
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
@@ -70,18 +91,26 @@ No outputs.
7091
This workflow validates the GitHub Action in the repository.
7192

7293
<!-- MERGE:START:validate-gh-action - Do not remove or modify this section -->
94+
### Secrets
95+
96+
<!-- AUTO-DOC-SECRETS:START - Do not remove or modify this section -->
97+
No secrets.
98+
<!-- AUTO-DOC-SECRETS:END -->
99+
73100
### Inputs
74101

75102
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
76103

77-
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
78-
|--------------|---------|----------|---------|--------------------------------|
79-
| auto_doc | boolean | false | `false` | If auto-doc should be run. |
80-
| markdownlint | boolean | false | `false` | If markdownlint should be run. |
81-
| shellcheck | boolean | false | `false` | If shellcheck should be run. |
82-
| yamlfmt | boolean | false | `false` | If yamlfmt should be run. |
104+
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
105+
|--------------|---------|----------|---------|---------------------------------------------|
106+
| auto_doc | boolean | false | `false` | If auto-doc should be run. |
107+
| markdownlint | boolean | false | `false` | DEPRECATED - If markdownlint should be run. |
108+
| rumdl | boolean | false | `false` | If rumdl should be run. |
109+
| shellcheck | boolean | false | `false` | If shellcheck should be run. |
110+
| yamlfmt | boolean | false | `false` | If yamlfmt should be run. |
83111

84112
<!-- AUTO-DOC-INPUT:END -->
113+
85114
### Outputs
86115

87116
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
@@ -94,19 +123,27 @@ No outputs.
94123
This workflow validates the GitHub Workflows in the repository.
95124

96125
<!-- MERGE:START:validate-gh-workflows - Do not remove or modify this section -->
126+
### Secrets
127+
128+
<!-- AUTO-DOC-SECRETS:START - Do not remove or modify this section -->
129+
No secrets.
130+
<!-- AUTO-DOC-SECRETS:END -->
131+
97132
### Inputs
98133

99134
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
100135

101-
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
102-
|-----------------|---------|----------|---------|--------------------------------|
103-
| auto_doc | boolean | false | `false` | If auto-doc should be run. |
104-
| auto_doc_script | string | false | | The script to run auto-doc. |
105-
| markdownlint | boolean | false | `false` | If markdownlint should be run. |
106-
| shellcheck | boolean | false | `false` | If shellcheck should be run. |
107-
| yamlfmt | boolean | false | `false` | If yamlfmt should be run. |
136+
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
137+
|-----------------|---------|----------|---------|---------------------------------------------|
138+
| auto_doc | boolean | false | `false` | If auto-doc should be run. |
139+
| auto_doc_script | string | false | | The script to run auto-doc. |
140+
| markdownlint | boolean | false | `false` | DEPRECATED - If markdownlint should be run. |
141+
| rumdl | boolean | false | `false` | If rumdl should be run. |
142+
| shellcheck | boolean | false | `false` | If shellcheck should be run. |
143+
| yamlfmt | boolean | false | `false` | If yamlfmt should be run. |
108144

109145
<!-- AUTO-DOC-INPUT:END -->
146+
110147
### Outputs
111148

112149
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->

hack/docs.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$ErrorActionPreference = "Stop"
22

3-
$repository = "lexisnexis-iac/workflows"
3+
$repository = "action-stars/generic-workflows"
44
$readmePath = "./README.md"
55

66
# Find all relevant YAML files
@@ -11,7 +11,7 @@ foreach ($file in $workflowFiles) {
1111
$tmpReadme = New-TemporaryFile
1212

1313
# Create initial content for the temporary README
14-
"## Inputs`n## Outputs`n" | Out-File -FilePath $tmpReadme.FullName -Encoding UTF8 -NoNewline
14+
"## Secrets`n`n## Inputs`n`n## Outputs`n" | Out-File -FilePath $tmpReadme.FullName -Encoding UTF8 -NoNewline
1515

1616
# Generate documentation using auto-doc
1717
& auto-doc --colMaxWords 100 --repository $repository --reusable --reusableOutputColumns "Output" --reusableOutputColumns "Description" --filename $file.FullName --output $tmpReadme.FullName

hack/docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ find ./.github/workflows -maxdepth 1 -name '*.yaml' ! -name '_*' -print0 | while
77
name="$(basename "${file}" .yaml)"
88

99
tmp_readme="$(mktemp)"
10-
printf '## Inputs\n## Outputs' >"${tmp_readme}"
10+
printf '## Secrets\n\n## Inputs\n\n## Outputs' >"${tmp_readme}"
1111
auto-doc --colMaxWords 100 --repository "${repository}" --reusable --reusableOutputColumns "Output" --reusableOutputColumns "Description" --filename "${file}" --output "${tmp_readme}"
1212
sed -i 's/## /### /g' "${tmp_readme}"
1313
sed -i 's/||/\\|\\|/g' "${tmp_readme}"

justfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
11
set windows-shell := ["pwsh", "-NoLogo", "-Command"]
22

33
default:
4-
just --list
4+
just --list
55

66
actionlint:
7-
actionlint -shellcheck=shellcheck
7+
actionlint -shellcheck=shellcheck
88

9-
markdownlint:
10-
npm exec markdownlint-cli2 --yes -- --fix "**/*.{md,markdown}"
9+
mdfmt:
10+
rumdl fmt --fix .
11+
12+
mdlint:
13+
rumdl check .
1114

1215
shellcheck:
13-
{{ if os_family() == "windows" { "Get-ChildItem -Recurse -File | Where-Object { $_.Extension -eq '.sh' } | ForEach-Object { & shellcheck $_.FullName }" } else { "find . -type f -name '*.sh' | xargs --no-run-if-empty -n1 shellcheck" } }}
16+
{{ if os_family() == "windows" { "Get-ChildItem -Recurse -File | Where-Object { $_.Extension -eq '.sh' } | ForEach-Object { & shellcheck $_.FullName }" } else { "find . -type f -name '*.sh' | xargs --no-run-if-empty -n1 shellcheck" } }}
1417

1518
yamlfmt:
16-
yamlfmt -continue_on_error
19+
yamlfmt -continue_on_error
1720

1821
docs:
19-
{{ if os_family() == "windows" { "./hack/docs.ps1" } else { "./hack/docs.sh" } }}
22+
{{ if os_family() == "windows" { "./hack/docs.ps1" } else { "./hack/docs.sh" } }}

0 commit comments

Comments
 (0)