Skip to content

Commit

Permalink
run markdown jobs only when changes to md related files
Browse files Browse the repository at this point in the history
  • Loading branch information
chicco785 authored Oct 5, 2023
1 parent 68d8ed5 commit 2b39525
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/markdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,28 @@ on:
required: false
type: string
jobs:
changes:
runs-on: ubuntu-latest
outputs:
files-changed: ${{ steps.filter.outputs.markdown }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
markdown:
- '*.{md,MD}'
- '**/*.{md,MD}'
- '.github/config/.markdownlint.json'
- '.github/config/.prettierignore'
- '.github/config/md-link-config.json'
- '.github/config/spellcheck.yml'
- '.github/config/wordlist.txt'
- '.github/workflows/*.yaml'
markdown:
needs: changes
if: ${{ needs.changes.outputs.files-changed == 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 2b39525

Please sign in to comment.