Skip to content

Commit

Permalink
chore: Add Markdownlint cleanup job
Browse files Browse the repository at this point in the history
yarn cache

chore: use mdn-bot as committer

chore: update PR titles and branch
  • Loading branch information
nschonni committed Aug 26, 2022
1 parent 4d5448b commit c981724
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"
committer: 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"
committer: mdn-bot <[email protected]>
body: |
Auto-fix was run, but additional issues found.
Please review the last action run of https://github.com/mdn/content/actions/workflows/markdown-lint-fix.yml

0 comments on commit c981724

Please sign in to comment.