1
0
Fork 0
mirror of https://git.madhouse-project.org/actions/nix.git synced 2024-11-23 12:09:16 +01:00

ci: Add a shellcheck workflow, and fix SC2086 in develop

Signed-off-by: Gergely Nagy <me@gergo.csillger.hu>
This commit is contained in:
Gergely Nagy 2023-09-22 22:34:09 +02:00
parent 29ec176179
commit 9cdda9ed9f
2 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,30 @@
---
name: Shellcheck
on:
push:
paths:
- '**/bin/*'
- '.forgejo/workflows/shellcheck.yaml'
jobs:
shellcheck:
runs-on: nixos-flakes
steps:
- name: checkout
uses: actions/checkout@v3
- name: install shellcheck
uses: ./shell
with:
flake: nixpkgs
package: shellcheck
- name: shellcheck all our scripts
uses: ./shell
with:
flake: nixpkgs
package: shellcheck
run: |
shellcheck **/bin/*

View file

@ -6,7 +6,7 @@ trap 'rm -rf "$workdir"' EXIT
echo "${INPUT_RUN}" >"${workdir}/run.sh"
__cmd="develop"
if [ "$(basename $0)" = "nix-shell" ]; then
if [ "$(basename "$0")" = "nix-shell" ]; then
__cmd="shell"
fi