-
Notifications
You must be signed in to change notification settings - Fork 113
41 lines (34 loc) · 891 Bytes
/
check-shellscripts.yml
File metadata and controls
41 lines (34 loc) · 891 Bytes
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
name: check-shellscripts
on:
push:
branches:
- main
pull_request:
jobs:
shellcheck:
name: Check shellscripts by shellcheck
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4
- name: Check shellscripts by shellcheck
uses: ludeeus/action-shellcheck@2.0.0
with:
ignore_paths: >-
thirdparty
thirdparty_unman
shfmt:
name: Check shellscript formatting
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4
- name: Install Golang
uses: actions/setup-go@v5
with:
go-version: '1.22'
check-latest: true
- name: Install shfmt
run: go install mvdan.cc/sh/v3/cmd/shfmt@latest
- name: Check shellscripts by shfmt
run: shfmt -d .