Publish Latest checklists 2024-12-20 #1792
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Markdown Lint Check | |
on: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- '**.md' | |
- '!.github/**' | |
permissions: | |
contents: read | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{github.event.pull_request.head.ref}} | |
repository: ${{github.event.pull_request.head.repo.full_name}} | |
- name: Save PR number | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
run: echo $PR_NUMBER > pr_number | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install dependencies | |
run: npm install -g markdownlint-cli | |
- name: Run linter | |
run: markdownlint . --config .github/configs/.markdownlint.json --ignore node_modules --ignore .github &> lint.txt | |
- name: Show Linting Issues | |
if: failure() | |
run: | | |
cat lint.txt | |
sed -i 's/```/triple-backtick/g' lint.txt | |
- name: Create artifact for comment | |
if: failure() | |
run: | | |
echo "**The following issues were identified:**" > artifact.txt | |
# Copy to generic name for commenting | |
cat lint.txt | tee -a artifact.txt | |
- name: Upload list of issues | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact | |
path: | | |
artifact.txt | |
pr_number | |