Skip to content

Commit 2c0ae70

Browse files
authored
Create lint.yml
1 parent 8cdeb9f commit 2c0ae70

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/lint.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
shellcheck:
11+
name: ShellCheck scripts
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Install ShellCheck
16+
run: sudo apt-get update && sudo apt-get install -y shellcheck
17+
- name: Run ShellCheck
18+
run: |
19+
if ls scripts/*.sh >/dev/null 2>&1; then
20+
shellcheck -S warning scripts/*.sh
21+
else
22+
echo "No shell scripts to check."
23+
fi
24+
25+
nginx-test:
26+
name: Validate nginx config
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- name: Install nginx
31+
run: sudo apt-get update && sudo apt-get install -y nginx
32+
- name: Check nginx.conf syntax
33+
run: |
34+
sudo nginx -t -c "$GITHUB_WORKSPACE/infra/nginx/nginx.conf" || true

0 commit comments

Comments
 (0)