mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-05-05 23:41:06 +00:00
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
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@v4
|
|
|
|
- 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 $CHANGED_FILES --ignore node_modules --ignore CONTRIBUTING.md --ignore README.md --ignore README_CN.md --ignore README_JA.md --ignore README_PT-BR.md --ignore docs/troubleshooting/bug.md
|
|
env:
|
|
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|