Skip to content

Commit 557a0ae

Browse files
committed
feat(ci): add shellCheck
1 parent 0334cfa commit 557a0ae

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,18 @@ permissions:
1414
packages: read
1515

1616
jobs:
17+
shellcheck:
18+
name: ShellCheck
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v6
23+
24+
- name: Run ShellCheck
25+
uses: ludeeus/action-shellcheck@master
26+
with:
27+
scandir: "scripts"
28+
1729
static-analysis:
1830
name: Static Analysis
1931
runs-on: ubuntu-latest
@@ -40,7 +52,7 @@ jobs:
4052
4153
build:
4254
name: Build with PlatformIO
43-
needs: static-analysis
55+
needs: [shellcheck, static-analysis]
4456
runs-on: ubuntu-latest
4557

4658
steps:

scripts/build-with-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ docker run --rm \
1111
-w /workspace \
1212
-v "$(pwd)/.pio:/tmp/.platformio" \
1313
-e PLATFORMIO_CORE_DIR=/tmp/.platformio \
14-
-u $(id -u):$(id -g) \
14+
-u "$(id -u):$(id -g)" \
1515
"$IMAGE_NAME" ${PIO_BIN} run
1616

1717
docker run --rm \
1818
-v "$(pwd):/workspace" \
1919
-w /workspace \
2020
-v "$(pwd)/.pio:/tmp/.platformio" \
2121
-e PLATFORMIO_CORE_DIR=/tmp/.platformio \
22-
-u $(id -u):$(id -g) \
22+
-u "$(id -u):$(id -g)" \
2323
"$IMAGE_NAME" ${PIO_BIN} run --target buildfs
2424

2525
echo "Done! Binaries in ${BUILD_DIR}"

0 commit comments

Comments
 (0)