Skip to content

Bump tj-actions/changed-files from 39 to 40 #145

Bump tj-actions/changed-files from 39 to 40

Bump tj-actions/changed-files from 39 to 40 #145

Workflow file for this run

---
name: Markdown
"on":
push:
branches:
- main
pull_request:
jobs:
detect-changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
any_changed: ${{ steps.detect-changes.outputs.any_changed }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Get changed files
id: detect-changes
uses: tj-actions/changed-files@v40
with:
files: |
**/*.md
- name: Print changed files
run: |
for file in ${{ steps.changed-files-specific.outputs.all_changed_files }}; do
echo "$file"
done
lint:
name: Lint code
runs-on: ubuntu-latest
needs: detect-changes
if: needs.detect-changes.outputs.any_changed == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: markdownlint-cli
uses: nosborn/github-action-markdown-cli@v3.3.0
with:
files: "**.md"
style:
name: Check style
runs-on: ubuntu-latest
needs: detect-changes
if: needs.detect-changes.outputs.any_changed == 'true'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: prettier
uses: creyD/prettier_action@v4.3
with:
dry: true
prettier_options: "--check **/*.md"