Skip to content

XS✔ ◾ [⚠️Don't merge] Testing new markdown action #12

XS✔ ◾ [⚠️Don't merge] Testing new markdown action

XS✔ ◾ [⚠️Don't merge] Testing new markdown action #12

name: Validate-Markdown
on:
pull_request:
branches: [ main ]
paths:
- '**.md' # This ensures the workflow only runs if there's a change in any Markdown files
workflow_dispatch:
jobs:
validate-markdown:
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
repository-projects: read
pull-requests: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
# Step to get a list of all the changed Markdown files
- name: Get changed files
id: files
uses: lots0logs/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Step to lint only the changed Markdown files
- name: Lint Markdown files
uses: articulate/actions-markdownlint@v1
with:
config: ./.markdownlint/config.json
files: ${{ steps.files.outputs.all }} # This passes the list of changed files to the linter