Auto-format markdown.
This commit is contained in:
38
.github/workflows/autofix.yaml
vendored
38
.github/workflows/autofix.yaml
vendored
@@ -36,6 +36,44 @@ jobs:
|
||||
commit_message: "[lint] Update TOC."
|
||||
file_pattern: readme.md
|
||||
|
||||
markdown:
|
||||
name: Format markdown and create a PR
|
||||
needs: toc
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.4
|
||||
- name: Install Pandoc
|
||||
run: |
|
||||
sudo apt install pandoc
|
||||
- name: Auto-format to GitHub-Flavored Markdown
|
||||
run: >
|
||||
pandoc ./readme.md --from=gfm --to=gfm --output=./readme.md
|
||||
--columns=79 --wrap=none --tab-stop=2
|
||||
- name: Auto-fix Markdown
|
||||
uses: avto-dev/markdown-lint@v1.4.0
|
||||
# Non-fixable markdown issues will return non-zero error code. Allow
|
||||
# that step to fail so we can proceed with creating the auto-fix PR
|
||||
# below.
|
||||
continue-on-error: true
|
||||
with:
|
||||
config: '.github/markdown-lint.yaml'
|
||||
args: './**/*.md'
|
||||
fix: true
|
||||
- uses: peter-evans/create-pull-request@v3.5.1
|
||||
with:
|
||||
author: "Kevin Deldycke <kevin@deldycke.com>"
|
||||
commit-message: "[autofix] Format Markdown"
|
||||
title: "[autofix] Format Markdown"
|
||||
body: >
|
||||
[Auto-generated on run
|
||||
#${{ github.run_id }}](https://github.com/${{ github.repository
|
||||
}}/actions/runs/${{ github.run_id }}) as defined by [workflow
|
||||
action](https://github.com/${{ github.repository
|
||||
}}/blob/${{ github.base_ref }}/.github/workflows/autofix.yaml).
|
||||
labels: "CI/CD"
|
||||
assignees: kdeldycke
|
||||
branch: format-markdown
|
||||
|
||||
json:
|
||||
name: Format JSON files and create a PR
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
Reference in New Issue
Block a user