Created
October 31, 2024 15:13
-
-
Save dbowling/6ae06d4d189dd022bfdb5046a7d73072 to your computer and use it in GitHub Desktop.
Example from markdownlint-cli-action of linting only changed files.
This file contains hidden or 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
# source: https://github.com/DavidAnson/markdownlint-cli2-action/blob/main/.github/workflows/changed.yml | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: tj-actions/changed-files@v45 | |
id: changed-files | |
with: | |
files: '**/*.md' | |
separator: "," | |
- uses: DavidAnson/markdownlint-cli2-action@v17 | |
if: steps.changed-files.outputs.any_changed == 'true' | |
with: | |
globs: ${{ steps.changed-files.outputs.all_changed_files }} | |
separator: "," |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment