-
Notifications
You must be signed in to change notification settings - Fork 238
40 lines (37 loc) · 1.16 KB
/
mdformat.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
name: "mdformat"
on:
push:
pull_request:
# The branches below must be a subset of the branches above
schedule:
- cron: "33 1 * * 3"
jobs:
mdformat:
name: "Markdown format checking"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.13
- name: cd and ls
run: |
cd ${{ github.workspace }}
ls -l
- name: Download dependencies
run: |
python -m pip install mdformat==0.7.18
- name: Format .md files
run: |
find . -name '*.md' | grep -v '/__' | xargs mdformat
- name: Check for changes
run: |
CHANGES=$(git diff --name-only HEAD --)
if [ -n "$CHANGES" ] ; then
echo "There are changes after running mdformat:"
echo "$CHANGES"
git diff
exit 1
fi