From b9174a171bf4f705f4b891fae123aa856b09ab2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gramain?= Date: Sun, 20 Oct 2024 21:56:46 +0200 Subject: [PATCH] lint --- .ci/lint.sh | 7 +++++++ .woodpecker/lint.yml | 14 ++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .ci/lint.sh create mode 100644 .woodpecker/lint.yml diff --git a/.ci/lint.sh b/.ci/lint.sh new file mode 100644 index 0000000..5c3d729 --- /dev/null +++ b/.ci/lint.sh @@ -0,0 +1,7 @@ +for i in $(find . -name "docker-compose.yml" -exec sh -c 'docker-compose -f {} config -q; echo {}:$?' \;); do + conf=$(echo $i | cut -d: -f1) + return_code=$(echo $i | cut -d: -f2) + if [ $return_code -ne "0" ]; then + echo $conf return code : $return_code && exit $return_code + fi +done \ No newline at end of file diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..60cda77 --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,14 @@ +steps: + lint: + image: debian:stable-slim + commands: + - apt-get update + - apt-get install -y curl + - curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose + - chmod +x //usr/local/bin/docker-compose + - sh .ci/lint.sh + when: + - event: pull_request + repo: gnouseu/plakken + - event: push + branch: main