CI: run shellcheck #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Shellcheck | |
on: | |
pull_request: | |
push: | |
branches: | |
- smelc/release-create-changelog | |
jobs: | |
example: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Nix with good defaults | |
uses: input-output-hk/install-nix-action@v20 | |
with: | |
extra_nix_config: | | |
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= | |
substituters = https://cache.iog.io/ https://cache.nixos.org/ | |
nix_path: nixpkgs=channel:nixos-unstable | |
- uses: cachix/install-nix-action@v18 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
# To make the environment in your flake's devShell available to future | |
# steps: | |
- uses: rrbutani/use-nix-shell-action@v1 | |
- name: Shellcheck | |
run: | | |
for file in $(git ls-files "*.sh") | |
do | |
if grep -q "$file" .github/workflows/shellcheck-exceptions | |
then | |
echo "⚠️ $file is ignored from shellcheck's verifications. Please consider fixing it." | |
else | |
shellcheck "$file" | |
fi | |
done |