Skip to content

Commit b53a8fc

Browse files
committed
Run markdownlint via docker compose
1 parent 917b114 commit b53a8fc

File tree

4 files changed

+48
-12
lines changed

4 files changed

+48
-12
lines changed

.github/workflows/markdown.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,30 @@
22
# github/workflows/markdown.yaml in
33
# https://github.com/itk-dev/devops_itkdev-docker if need be.
44

5-
### ## Markdown
5+
### ### Markdown
66
###
7-
### Uses [itkdev/markdownlint](https://hub.docker.com/r/itkdev/markdownlint) to
8-
### link all Markdown files (`**/*.md`) in the project.
7+
### Lints Markdown files (`**/*.md`) in the project.
98
###
10-
### [markdownlint-cli configuration ### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration),
11-
### `.markdownlint.jsonc` and `.markdownlintignore` control what is actually linted and how.
9+
### [markdownlint-cli configuration
10+
### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration),
11+
### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually
12+
### linted and how.
13+
###
14+
### #### Assumptions
15+
###
16+
### 1. A docker compose service named `markdownlint` for running `markdownlint`
17+
### (from
18+
### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli))
19+
### exists.
1220

1321
name: Markdown
1422

1523
on:
1624
pull_request:
1725
push:
26+
branches:
27+
- main
28+
- develop
1829

1930
jobs:
2031
markdown-lint:
@@ -26,4 +37,7 @@ jobs:
2637
uses: actions/checkout@v4
2738

2839
- run: |
29-
docker run --rm --volume "$PWD":/md itkdev/markdownlint '**/*.md'
40+
docker network create frontend
41+
42+
- run: |
43+
docker compose run --rm markdownlint markdownlint '**/*.md'

compose.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
services:
2+
markdownlint:
3+
image: itkdev/markdownlint
4+
profiles:
5+
- dev
6+
volumes:
7+
- ./:/md

docs/github-actions-templates.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- DO NOT EDIT THIS FILE!
22
3-
It was automatically created at 2025-05-05T10:20:02+02:00
3+
It was automatically created at 2025-05-06T10:12:47+02:00
44
by task/scripts/github-documentation-update
55
based on /app/task/scripts/../templates/github-actions-templates.md
66
-->
@@ -142,14 +142,20 @@ Validates styles files.
142142

143143
### Markdown
144144

145-
Uses [itkdev/markdownlint](https://hub.docker.com/r/itkdev/markdownlint) to
146-
link all Markdown files (`**/*.md`) in the project.
145+
Lints Markdown files (`**/*.md`) in the project.
147146

148147
[markdownlint-cli configuration
149148
files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration),
150149
`.markdownlint.jsonc` and `.markdownlintignore`, control what is actually
151150
linted and how.
152151

152+
#### Assumptions
153+
154+
1. A docker compose service named `markdownlint` for running `markdownlint`
155+
(from
156+
[markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli))
157+
exists.
158+
153159
---
154160

155161
[github/workflows/symfony/php.yaml](github/workflows/symfony/php.yaml)

github/workflows/markdown.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,19 @@
44

55
### ### Markdown
66
###
7-
### Uses [itkdev/markdownlint](https://hub.docker.com/r/itkdev/markdownlint) to
8-
### link all Markdown files (`**/*.md`) in the project.
7+
### Lints Markdown files (`**/*.md`) in the project.
98
###
109
### [markdownlint-cli configuration
1110
### files](https://github.com/igorshubovych/markdownlint-cli?tab=readme-ov-file#configuration),
1211
### `.markdownlint.jsonc` and `.markdownlintignore`, control what is actually
1312
### linted and how.
13+
###
14+
### #### Assumptions
15+
###
16+
### 1. A docker compose service named `markdownlint` for running `markdownlint`
17+
### (from
18+
### [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli))
19+
### exists.
1420

1521
name: Markdown
1622

@@ -31,4 +37,7 @@ jobs:
3137
uses: actions/checkout@v4
3238

3339
- run: |
34-
docker run --rm --volume "$PWD":/md itkdev/markdownlint '**/*.md'
40+
docker network create frontend
41+
42+
- run: |
43+
docker compose run --rm markdownlint markdownlint '**/*.md'

0 commit comments

Comments
 (0)