Skip to content

Commit ff06c52

Browse files
authored
Merge pull request #35 from lool/shellcheck
workflows: Add ShellCheck static analysis job
2 parents 9f92e77 + 548c30c commit ff06c52

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

.github/workflows/shellcheck.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Static analysis of shell scripts with ShellCheck
2+
3+
on:
4+
# run on pull requests to the main branch
5+
pull_request:
6+
branches: [main]
7+
# run on pushes to the main branch
8+
push:
9+
branches: [main]
10+
11+
# only need permission to read repository; implicitely set all other
12+
# permissions to none
13+
permissions:
14+
contents: read
15+
16+
# cancel in progress builds for this workflow triggered by the same ref
17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
jobs:
22+
shellcheck:
23+
name: Install and run ShellCheck on shell scripts
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Install ShellCheck
27+
run: sudo apt update && sudo apt -y install shellcheck
28+
29+
- uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Run ShellCheck
34+
run: shellcheck scripts/*
35+

scripts/build-linux-deb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ fi
8282

8383
log_i "Building Linux deb"
8484
# TODO: build other packages?
85-
make -j$(nproc) \
85+
make "-j$(nproc)" \
8686
ARCH=arm64 DEB_HOST_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \
8787
bindeb-pkg
8888

scripts/build-u-boot-rb1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ log_i "Configuring U-Boot (${CONFIG})"
7272
make "${CONFIG}"
7373

7474
log_i "Building U-Boot (with device tree ${U_BOOT_DEVICE_TREE})"
75-
make -j`nproc` \
75+
make "-j$(nproc)" \
7676
CROSS_COMPILE=aarch64-linux-gnu- DEVICE_TREE="${U_BOOT_DEVICE_TREE}"
7777

7878
log_i "Creating Android boot image (${ABOOT_OUTPUT})"

0 commit comments

Comments
 (0)