Skip to content

fixed CI so I don't have to manually edit markdowns anymore #7

fixed CI so I don't have to manually edit markdowns anymore

fixed CI so I don't have to manually edit markdowns anymore #7

Workflow file for this run

name: CI Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
shellcheck:
name: Shell Script Linter
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install ShellCheck
run: sudo apt-get install -y shellcheck
- name: Run ShellCheck on scripts
run: find Scripts Scripts/Setupscripts -type f -name "*.sh" -exec shellcheck {} + || exit 1
markdownlint:
name: Markdown Linter
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install markdownlint-cli2
run: npm install -g markdownlint-cli2
- name: Auto-fix Markdown Issues
run: markdownlint-cli2 --fix **/*.md
- name: Check for Unfixed Markdown Issues
run: git diff --exit-code || (echo "Markdown issues found after auto-fix. Please review manually." && exit 1)
- name: Commit and Push Fixes (if any)
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git diff --quiet || (git add . && git commit -m "Auto-fix markdown issues" && git push)