-
Notifications
You must be signed in to change notification settings - Fork 174
35 lines (29 loc) · 1019 Bytes
/
shellcheck.yml
File metadata and controls
35 lines (29 loc) · 1019 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
name: Shellcheck
# This pipeline runs shellcheck on all shell scripts in the repo.
#
# It uses Nix, so that the shellcheck version used is the same as the one used
# by developers in Nix shells. This ensures the CI's behavior is consistent
# with the one of developers.
on:
push:
branches: [ "master", "release/**" ]
pull_request:
# For running the workflow manually - useful for branches without PRs, for which CI isn't run automatically
workflow_dispatch:
jobs:
shellcheck:
runs-on: ubuntu-latest
steps:
- name: Check out source
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Use nix
uses: rrbutani/use-nix-shell-action@v1
with:
extraNixOptions: --accept-flake-config
- name: Shellcheck
run: |
git ls-files scripts | xargs -rd\\n file | egrep 'Bourne|bash' | cut -d: -f1 | xargs -rd\\n shellcheck