skpping over desktop entries #16
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
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@v3 | |
- 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@v3 | |
with: | |
persist-credentials: true | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install markdownlint-cli2 | |
run: npm install -g markdownlint-cli2 | |
- name: Run MarkdownLint Auto-Fix (Skipping Problematic Files) | |
run: | | |
markdownlint-cli2 --fix "**/*.md" --ignore "Desktop Entries/**" --ignore "KDE/Fix Annoyances.md" || true | |
- name: Check for changes | |
id: git-diff | |
run: | | |
git diff --quiet || echo "changes_detected=true" >> $GITHUB_ENV | |
- name: Commit and Push Fixes | |
if: env.changes_detected == 'true' | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "Auto-fix MarkdownLint issues" | |
git push | |
- name: Run MarkdownLint Again to Ensure No Errors (Skipping Problematic Files) | |
run: | | |
markdownlint-cli2 "**/*.md" --ignore "Desktop Entries/**" --ignore "KDE/Fix Annoyances.md" || true |