From 7a8dca2e4f509dd44b87c701dc4ed65266c484fa Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sun, 23 Oct 2022 13:26:05 +0200 Subject: [PATCH 1/6] ci(lint): add lint-pipeline step --- .woodpecker/lint.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 4cf754e..3e92771 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -1,4 +1,5 @@ variables: + - &golang_image 'golang:1.18' - &when_path_lua - ".woodpecker/lint.yml" - "justfile" @@ -9,6 +10,14 @@ variables: - "**/*.tl" pipeline: + lint-pipeline: + image: *golang_image + commands: + - go run github.com/woodpecker-ci/woodpecker/cmd/cli lint + when: + path: + - ".woodpecker/**" + lint-lua: image: ghcr.io/lunarmodules/luacheck:v0.26.1 group: lint -- 2.40.1 From b0e7a7485ae5f659f5627f3ff1853e091afd0e0e Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sun, 23 Oct 2022 14:08:03 +0200 Subject: [PATCH 2/6] ci(lint): fix the lint-pipeline step --- .woodpecker/lint.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 3e92771..a18131f 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -1,5 +1,4 @@ variables: - - &golang_image 'golang:1.18' - &when_path_lua - ".woodpecker/lint.yml" - "justfile" @@ -11,9 +10,12 @@ variables: pipeline: lint-pipeline: - image: *golang_image + image: woodpeckerci/woodpecker-cli:v0.15.5-alpine + group: lint commands: - - go run github.com/woodpecker-ci/woodpecker/cmd/cli lint + - echo "before" + - woodpecker-cli lint + - echo "after" when: path: - ".woodpecker/**" -- 2.40.1 From 58bfc09fccc7f2fdf9751c61ba317ef9e40ad6a1 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sun, 23 Oct 2022 18:33:14 +0200 Subject: [PATCH 3/6] ci(lint): fix pipeline-lint never failing --- .woodpecker/lint.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index a18131f..3c7ad01 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -13,9 +13,7 @@ pipeline: image: woodpeckerci/woodpecker-cli:v0.15.5-alpine group: lint commands: - - echo "before" - - woodpecker-cli lint - - echo "after" + - woodpecker-cli lint .woodpecker/*.yml when: path: - ".woodpecker/**" -- 2.40.1 From bda5c85a7b4bdadbf8e8a7d6edb4e458f1490723 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sun, 23 Oct 2022 18:53:48 +0200 Subject: [PATCH 4/6] ci(lint): upgrade lint-pipeline image --- .woodpecker/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 3c7ad01..98e2309 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -10,7 +10,7 @@ variables: pipeline: lint-pipeline: - image: woodpeckerci/woodpecker-cli:v0.15.5-alpine + image: woodpeckerci/woodpecker-cli:next-alpine group: lint commands: - woodpecker-cli lint .woodpecker/*.yml -- 2.40.1 From f5c63fd4f8451030c8f42ed0b7a49772aa025013 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sun, 23 Oct 2022 18:56:22 +0200 Subject: [PATCH 5/6] ci(lint): disable lint-pipeline step --- .woodpecker/lint.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 98e2309..64c9f6e 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -9,14 +9,14 @@ variables: - "**/*.tl" pipeline: - lint-pipeline: - image: woodpeckerci/woodpecker-cli:next-alpine - group: lint - commands: - - woodpecker-cli lint .woodpecker/*.yml - when: - path: - - ".woodpecker/**" + # lint-pipeline: + # image: woodpeckerci/woodpecker-cli:next-alpine + # group: lint + # commands: + # - woodpecker-cli lint .woodpecker/*.yml + # when: + # path: + # - ".woodpecker/**" lint-lua: image: ghcr.io/lunarmodules/luacheck:v0.26.1 -- 2.40.1 From 8c9693f17324ba66044161e7c90090ecfa8de5b4 Mon Sep 17 00:00:00 2001 From: Aire-One Date: Sun, 23 Oct 2022 19:01:39 +0200 Subject: [PATCH 6/6] ci: only run on master branch --- .woodpecker/build.yml | 2 ++ .woodpecker/lint.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.woodpecker/build.yml b/.woodpecker/build.yml index 7f586a5..0383ef3 100644 --- a/.woodpecker/build.yml +++ b/.woodpecker/build.yml @@ -23,3 +23,5 @@ pipeline: # commands: # - apk add tree # - tree generated + +branches: master diff --git a/.woodpecker/lint.yml b/.woodpecker/lint.yml index 64c9f6e..2bb700b 100644 --- a/.woodpecker/lint.yml +++ b/.woodpecker/lint.yml @@ -45,3 +45,5 @@ pipeline: - just check-teal when: path: *when_path_teal + +branches: master -- 2.40.1