-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (51 loc) · 1.71 KB
/
ci.yml
File metadata and controls
62 lines (51 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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