Skip to content

Commit

Permalink
chore: Add Markdownlint cleanup job (#16036)
Browse files Browse the repository at this point in the history
* chore: Add Markdownlint cleanup job

yarn cache

chore: use mdn-bot as author

chore: update PR titles and branch

* chore: add direct link to failing job

Co-authored-by: Claas Augner <[email protected]>

Co-authored-by: Claas Augner <[email protected]>
  • Loading branch information
nschonni and caugner authored Sep 7, 2022
1 parent 303a567 commit ada64d8
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/markdown-lint-fix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Create Markdownlint auto-fix PR

on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

jobs:
fix:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: "16"
cache: yarn

- name: Install all yarn packages
run: |
yarn --frozen-lockfile
- name: Lint markdown files
run: |
yarn lint:md
- name: Create PR with only fixable issues
if: success()
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore: auto-fix Markdownlint issues"
branch: markdownlint-auto-cleanup
title: "Markdownlint auto-cleanup"
author: mdn-bot <[email protected]>
body: |
All issues auto-fixed
- name: Create PR with notice on unfixed issues
if: failure()
uses: peter-evans/create-pull-request@v4
with:
commit-message: "chore: auto-fix Markdownlint issues"
branch: markdownlint-auto-cleanup
title: "Markdownlint auto-cleanup"
author: mdn-bot <[email protected]>
body: |
Auto-fix was run, but additional issues found.
Please review the run log: https://github.com/mdn/content/actions/runs/${GITHUB_RUN_ID}?check_suite_focus=true#step:5:1

0 comments on commit ada64d8

Please sign in to comment.