From 78673703e69f6a2b30d72d1fea2e35a7a607b196 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Tue, 6 Aug 2024 03:39:33 +0200 Subject: [PATCH] feat(ci): add lint pipeline --- .editorconfig | 2 +- .hadolint.yaml | 4 ++++ .woodpecker/lint.yml | 25 +++++++++++++++++++++++++ cspell.json | 8 ++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .hadolint.yaml create mode 100644 .woodpecker/lint.yml create mode 100644 cspell.json diff --git a/.editorconfig b/.editorconfig index 71ca37d..77780ae 100644 --- a/.editorconfig +++ b/.editorconfig @@ -11,5 +11,5 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.json] +[*.{json,yml}] indent_size = 2 diff --git a/.hadolint.yaml b/.hadolint.yaml new file mode 100644 index 0000000..64a262a --- /dev/null +++ b/.hadolint.yaml @@ -0,0 +1,4 @@ +--- + +ignored: + - DL3018 # warning: Pin versions in apk add. Instead of `apk add ` use `apk add =` diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml new file mode 100644 index 0000000..57f6e2e --- /dev/null +++ b/.woodpecker/lint.yml @@ -0,0 +1,25 @@ +--- + +when: + event: pull_request + +steps: + woodpecker: + image: woodpeckerci/woodpecker-cli:v2.7.0-alpine + commands: + - woodpecker-cli lint .woodpecker/*.yml + when: + path: .woodpecker/**/*.yml + + dockerfile: + image: hcr.io/hadolint/hadolint:v2.12.0 + commands: + - hadolint Dockerfile + # when: + # path: + # - Dockerfile + + cspell: + image: ghcr.io/streetsidesoftware/cspell:8.13.1 + commands: + - cspell lint . diff --git a/cspell.json b/cspell.json new file mode 100644 index 0000000..ec17382 --- /dev/null +++ b/cspell.json @@ -0,0 +1,8 @@ +{ + "words": [ + "aireone", + "buildx", + "gitea", + "woodpeckerci" + ] +}