From 4f3993539db5792896ab0b4c8e207036d502307c Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Mon, 29 Jan 2024 11:58:25 +0100 Subject: [PATCH] addci: add shellcheck --- .woodpecker/lint.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 54784e4..723fc31 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -8,6 +8,7 @@ steps: event: exclude: - tag + hadolint: image: pipelinecomponents/hadolint:0.26.0@sha256:7122937006c7a9bcbb78ce764d3c2f0092f183b843ad128bc9fd6ea918e22d5b commands: @@ -16,3 +17,20 @@ steps: event: exclude: - tag + + shellcheck: + image: registry.mgrote.net/allzweckcontainer + commands: + - | + if find . -type f -not -path '/.git/' -exec file {} ; | grep -q "shell script"; then + find . -type f -not -path '/.git/' -exec file {} ; | grep "shell script" | awk -F':' '{print $1}' | xargs -n1 shellcheck || echo "hallo" + exit 1 + else + echo "No files specified." + exit 0 + fi + when: + event: + exclude: + - tag +...