From f825e8356e8445ac2e04b599b51ad4a6b8964e34 Mon Sep 17 00:00:00 2001 From: Michael 'Flimmy' Flemming Date: Mon, 12 Jan 2026 15:55:51 +0100 Subject: [PATCH] add pipeline to autogenerate a docs pr for env changes --- .woodpecker.star | 51 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/.woodpecker.star b/.woodpecker.star index 92c2ee16e..70b7df0f4 100644 --- a/.woodpecker.star +++ b/.woodpecker.star @@ -576,7 +576,7 @@ def main(ctx): ), ) - pipelines = test_pipelines + build_release_pipelines + notifyMatrix(ctx) + pipelines = test_pipelines + build_release_pipelines + gen_docs_pr(ctx) + notifyMatrix(ctx) pipelineSanityChecks(pipelines) return savePipelineNumber(ctx) + pipelines @@ -2213,6 +2213,55 @@ def makeGoGenerate(module): }, ] +def gen_docs_pr(ctx): + return [{ + "name": "gen-docs-pr", + "skip_clone": True, + "workspace": { + "base": "/woodpecker", + "path": "docs_gen_pr", + }, + "steps": [ + # { + # "name": "clone", + # "image": "woodpeckerci/plugin-git", + # "settings": { + # "remote": "https://github.com/opencloud-eu/markdown-docs-generator.git", + # "path": "/docs_gen_pr", + # }, + # }, + { + "name": "make-docs-pr", + "image": "quay.io/opencloudeu/golang-ci", + "environment": { + "GH_TOKEN": { + "from_secret": "github_token", + }, + }, + "commands": [ + "gh auth status", + "gh repo clone opencloud-eu/markdown-docs-generator /woodpecker/docs_gen_pr" + #"make git-clone", + #"make all", + #"gh auth status", + #"make create-docs-pullrequest", + ] + }, + ], + "when": [ + { + "event": "push", + "branch": "main", + "path": "services/*/pkg/config/**/*.go", + }, + { + "event": "push", + "branch": "add_docs_pr_gen_pipeline", + "path": ".woodpecker.star", + }, + ], + }] + def notifyMatrix(ctx): result = [{ "name": "chat-notifications",