-
Notifications
You must be signed in to change notification settings - Fork 2.7k
28 lines (25 loc) · 726 Bytes
/
pr.yml
File metadata and controls
28 lines (25 loc) · 726 Bytes
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
on: [pull_request]
permissions:
contents: read
pull-requests: read
checks: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Write git diff to temp file
run: |
git fetch origin
git diff origin/${{ github.base_ref }} *.md translations/*/*.md \
| sed -n '/^+/p' | sed '/^+++/d' | sed 's/^+//' \
> ${{ runner.temp }}/diff.md
- name: Output diff
run: cat ${{ runner.temp }}/diff.md
- name: Check diff with markdownlint
uses: DavidAnson/markdownlint-cli2-action@v17
with:
globs: "${{ runner.temp }}/diff.md"