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:
parent
29ec176179
commit
9cdda9ed9f
2 changed files with 31 additions and 1 deletions
30
.forgejo/workflows/shellcheck.yaml
Normal file
30
.forgejo/workflows/shellcheck.yaml
Normal 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/*
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue