forked from eigent-ai/eigent
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.01 KB
/
Copy pathlint-markdown.yml
File metadata and controls
38 lines (32 loc) · 1.01 KB
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
name: Lint Markdown
# SECURITY: Use pull_request (not pull_request_target) for workflows that
# checkout and execute code from PRs. This ensures fork PRs run with
# read-only permissions and no access to repository secrets.
#
# See: https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
on:
pull_request:
branches:
- main
paths:
- '**.md'
permissions:
contents: read
jobs:
lint:
name: Lint Markdown
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v6
- name: Get changed markdown files
id: changed-files
uses: tj-actions/changed-files@v47
with:
files: |
**.md
- name: Lint markdown
if: steps.changed-files.outputs.any_changed == 'true'
run: npx markdownlint-cli@0.43.0 --ignore 'resources/**' --ignore 'backend/benchmark/harbor/template/**' $CHANGED_FILES
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}