Skip to content

Commit

Permalink
Migrate lint-quarto workflow from .github repo
Browse files Browse the repository at this point in the history
  • Loading branch information
Bisaloo committed Feb 12, 2024
1 parent 840537f commit 4e93a3c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/lint-changed-quarto.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
pull_request:
branches: [main, master]
paths:
- '**.qmd'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-changed-quarto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- run: npm install markdownlint-cli

- name: Get changed quarto files
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
id: changed-qmd
run: echo "CHANGED=$(gh pr diff ${{ github.event.pull_request.number }} --name-only | grep '\.qmd$' | tr '\n' ' ')" >> $GITHUB_OUTPUT

- run: npx markdownlint-cli ${{ steps.changed-qmd.outputs.CHANGED }} --dot --disable line_length first-line-h1 link-image-reference-definitions

0 comments on commit 4e93a3c

Please sign in to comment.