Skip to content

Commit fd331ad

Browse files
committed
feat: add install-shellcheck action
1 parent f2506be commit fd331ad

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Install ShellCheck
2+
description: "installs shellcheck. Supports: Ubuntu, MacoS, and Windows"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: install shellcheck -- ubuntu-latest
7+
if: runner.os == "Linux"
8+
uses: awalsh128/cache-apt-pkgs-action@latest
9+
with:
10+
packages: shellcheck
11+
version: 1.0
12+
- name: install shellcheck -- macos-latest
13+
if: runner.os == "macOS"
14+
run: brew install shellcheck
15+
- name: install shellcheck -- Windows
16+
if: runner.os == "Windows"
17+
shell: powershell
18+
run: |
19+
gh release download -R koalaman/shellcheck -p 'shellcheck-v*.zip' -o shellcheck-latest.zip
20+
7z x shellcheck-latest.zip
21+
echo $(Get-Location).Path >> "$GITHUB_PATH"
22+

.github/workflows/CI.yml

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
workflow_dispatch:
89

910
jobs:
1011
format:
@@ -60,6 +61,7 @@ jobs:
6061
os: [windows-latest, macos-latest, ubuntu-latest]
6162
steps:
6263
- uses: actions/checkout@v4
64+
- uses: ./.github/actions/install-shellcheck
6365
- run: git config --global core.autocrlf false
6466
- name: Update Rust
6567
run: rustup update stable && rustup default stable
@@ -73,6 +75,7 @@ jobs:
7375
os: [windows-latest, macos-latest, ubuntu-latest]
7476
steps:
7577
- uses: actions/checkout@v4
78+
- uses: ./.github/actions/install-shellcheck
7679
- run: git config --global core.autocrlf false
7780
- name: Update Rust
7881
run: rustup update stable && rustup default stable

0 commit comments

Comments
 (0)