mirror of
https://github.com/vacp2p/rfc-index.git
synced 2026-01-07 23:04:09 -05:00
18
.github/workflows/markdown-lint.yml
vendored
18
.github/workflows/markdown-lint.yml
vendored
@@ -1,6 +1,7 @@
|
||||
name: markdown-linting
|
||||
|
||||
on:
|
||||
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
@@ -13,10 +14,19 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.base.ref }}
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Get changed files
|
||||
continue-on-error: true
|
||||
run: |
|
||||
echo "CHANGED_FILES<<EOF" >> $GITHUB_ENV
|
||||
gh pr diff ${{ github.event.number }} --name-only | sed -e 's|$|,|' | xargs -i echo "{}" >> $GITHUB_ENV
|
||||
echo "EOF" >> $GITHUB_ENV
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
|
||||
- name: Markdown Linter
|
||||
uses: DavidAnson/markdownlint-cli2-action@v15
|
||||
with:
|
||||
globs: '/*.md'
|
||||
globs: ${{ env.CHANGED_FILES }}
|
||||
|
||||
Reference in New Issue
Block a user