From 2fdc68654f4a49c6becdfc171e7480c5d4496e21 Mon Sep 17 00:00:00 2001 From: mya Date: Sat, 30 Dec 2023 19:13:31 -0600 Subject: [PATCH] ci: add woodpecker config --- .gitignore | 1 + .woodpecker/.generate.yaml | 12 ++++++++++++ .woodpecker/.lint.yaml | 10 ++++++++++ scripts/go.mod | 2 +- scripts/merge-swagger/main.go | 3 +++ 5 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .woodpecker/.generate.yaml create mode 100644 .woodpecker/.lint.yaml diff --git a/.gitignore b/.gitignore index 62d222f..e32dedb 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ !buf.lock !buf.yaml +!.woodpecker/* !legal/* !scripts/**/* !swagger/* diff --git a/.woodpecker/.generate.yaml b/.woodpecker/.generate.yaml new file mode 100644 index 0000000..c5113c4 --- /dev/null +++ b/.woodpecker/.generate.yaml @@ -0,0 +1,12 @@ +steps: + generate: + image: golang:1.20 + environment: + GO111MODULE: on + GOBIN: /usr/local/bin + commands: + - go install github.com/bufbuild/buf/cmd/buf@latest + - make generate + - git status -s + +depends_on: [ lint ] diff --git a/.woodpecker/.lint.yaml b/.woodpecker/.lint.yaml new file mode 100644 index 0000000..c7dd402 --- /dev/null +++ b/.woodpecker/.lint.yaml @@ -0,0 +1,10 @@ +steps: + lint: + image: golang:1.20 + environment: + GO111MODULE: on + GOBIN: /usr/local/bin + commands: + - go install github.com/google/addlicense@latest + - go install github.com/bufbuild/buf/cmd/buf@latest + - make lint diff --git a/scripts/go.mod b/scripts/go.mod index 9ce0f38..1b204c8 100644 --- a/scripts/go.mod +++ b/scripts/go.mod @@ -1,4 +1,4 @@ -module code.pitz.tech/licensing/proto +module code.pitz.tech/licensing/proto/scripts go 1.20 diff --git a/scripts/merge-swagger/main.go b/scripts/merge-swagger/main.go index b8fcf51..83c16bb 100644 --- a/scripts/merge-swagger/main.go +++ b/scripts/merge-swagger/main.go @@ -1,3 +1,6 @@ +// Copyright (C) 2023 The Licensing Authors +// SPDX-License-Identifier: MIT + package main import (