Markdown Lint #52
This file contains 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
# | |
# Author: Hari Sekhon | |
# Date: 2023-07-27 01:04:53 +0100 (Thu, 27 Jul 2023) | |
# | |
# vim:ts=2:sts=2:sw=2:et | |
# | |
# https://github.com/HariSekhon/GitHub-Actions | |
# | |
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback | |
# | |
# https://www.linkedin.com/in/HariSekhon | |
# | |
# ============================================================================ # | |
# M a r k d o w n L i n t | |
# ============================================================================ # | |
--- | |
name: Markdown Lint | |
on: | |
push: | |
branches: | |
- master | |
- main | |
paths: | |
- '**.md' | |
- .mdlrc | |
- .mdl.rb | |
- .markdownlint.rb | |
- .github/workflows/markdown.yaml | |
pull_request: | |
branches: | |
- master | |
- main | |
paths: | |
- '**.md' | |
- .mdlrc | |
- .mdl.rb | |
- .markdownlint.rb | |
- .github/workflows/markdown.yaml | |
workflow_call: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * 1' | |
permissions: | |
contents: read | |
defaults: | |
run: | |
shell: bash -euxo pipefail {0} | |
jobs: | |
readme_lint: | |
name: Readme lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Environment | |
run: env | sort | |
- name: Git version | |
run: git --version | |
- uses: actions/checkout@v3 | |
#name: Git Checkout # better to show the action@version | |
with: | |
submodules: 'false' # requires Git 2.18+ to be installed first | |
# create .mdlrc at the root of your repo to ignore some things like long lines, | |
# see https://github.com/HariSekhon/DevOps-Bash-tools/blob/master/configs/.mdlrc | |
- name: Run mdl | |
uses: actionshub/markdownlint@main |