Skip to content

Commit 37b02e8

Browse files
committed
chore(ci): skip build workflow for non-code changes
Skip linting, building, and testing when only non-code files change: - Documentation (*.md, docs/) - Assets (assets/, schemas/) - GitHub templates (.github/ISSUE_TEMPLATE/) - IDE/editor config (.idea/, .claude/) - Git config (.gitignore) - Commit lint config (.commitlintrc.yml, package.json, package-lock.json) - Install scripts (install.sh, install.ps1) - LICENSE Add new script-lint.yml workflow that runs ShellCheck and PSScriptAnalyzer when install scripts change. Commit and PR title linting still runs via commit-lint.yml.
1 parent da237dd commit 37b02e8

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,38 @@ name: Build & Test
33
on:
44
push:
55
branches: [ main ]
6+
paths-ignore:
7+
- '**.md'
8+
- 'docs/**'
9+
- 'assets/**'
10+
- 'schemas/**'
11+
- '.github/ISSUE_TEMPLATE/**'
12+
- '.idea/**'
13+
- '.claude/**'
14+
- '.gitignore'
15+
- '.commitlintrc.yml'
16+
- 'package.json'
17+
- 'package-lock.json'
18+
- 'LICENSE'
19+
- 'install.sh'
20+
- 'install.ps1'
621
pull_request:
722
branches: [ main ]
23+
paths-ignore:
24+
- '**.md'
25+
- 'docs/**'
26+
- 'assets/**'
27+
- 'schemas/**'
28+
- '.github/ISSUE_TEMPLATE/**'
29+
- '.idea/**'
30+
- '.claude/**'
31+
- '.gitignore'
32+
- '.commitlintrc.yml'
33+
- 'package.json'
34+
- 'package-lock.json'
35+
- 'LICENSE'
36+
- 'install.sh'
37+
- 'install.ps1'
838

939
permissions:
1040
contents: read

.github/workflows/script-lint.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Lint Install Scripts
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'install.sh'
8+
- 'install.ps1'
9+
pull_request:
10+
branches: [ main ]
11+
paths:
12+
- 'install.sh'
13+
- 'install.ps1'
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
shellcheck:
20+
name: Lint install.sh
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Run ShellCheck
27+
uses: ludeeus/action-shellcheck@master
28+
with:
29+
scandir: '.'
30+
additional_files: 'install.sh'
31+
32+
psscriptanalyzer:
33+
name: Lint install.ps1
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
39+
- name: Run PSScriptAnalyzer
40+
shell: pwsh
41+
run: |
42+
Install-Module -Name PSScriptAnalyzer -Force -Scope CurrentUser
43+
$results = Invoke-ScriptAnalyzer -Path ./install.ps1 -Severity Error,Warning
44+
if ($results) {
45+
$results | Format-Table -AutoSize
46+
exit 1
47+
}
48+
Write-Host "✅ No issues found in install.ps1"

0 commit comments

Comments
 (0)