diff --git a/.woodpecker/docs.yml b/.woodpecker/docs.yml index 8e173287c..662e57a5f 100644 --- a/.woodpecker/docs.yml +++ b/.woodpecker/docs.yml @@ -1,12 +1,7 @@ when: event: [pull_request, push, cron] branch: ${CI_REPO_DEFAULT_BRANCH} - - -variables: - - &golang_image 'golang:1.20.2' - - &node_image 'node:18-alpine' - - &when_path + path: - "docs/**" - ".woodpecker/docs.yml" # since we generate docs for cli tool we have to watch this too @@ -15,13 +10,16 @@ variables: # api docs - "server/api/**" +variables: + - &golang_image 'golang:1.20.2' + - &node_image 'node:18-alpine' + steps: build-cli: image: *golang_image commands: - make docs when: - - path: *when_path - cron: update_docs event: cron @@ -33,7 +31,6 @@ steps: - pnpm install --frozen-lockfile - pnpm build when: - - path: *when_path - cron: update_docs event: cron @@ -50,7 +47,6 @@ steps: failure: ignore when: event: pull_request - path: *when_path # TODO: add step to remove preview again after PR is closed (waiting for #286) @@ -78,6 +74,5 @@ steps: when: - event: push branch: ${CI_REPO_DEFAULT_BRANCH} - path: *when_path - cron: update_docs event: cron diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml index a6330f09f..c1c9b4eb6 100644 --- a/.woodpecker/test.yml +++ b/.woodpecker/test.yml @@ -1,9 +1,5 @@ when: - - event: [pull_request, tag] - - event: push - branch: - - ${CI_REPO_DEFAULT_BRANCH} - - release/* + event: [pull_request, tag] variables: - &golang_image 'golang:1.20.2' diff --git a/.woodpecker/web.yml b/.woodpecker/web.yml index d1ab9be58..fc2ebe80b 100644 --- a/.woodpecker/web.yml +++ b/.woodpecker/web.yml @@ -1,25 +1,15 @@ when: - - event: [pull_request, tag] - - event: push - branch: - - ${CI_REPO_DEFAULT_BRANCH} - - release/* + event: [pull_request, tag] + path: &when_path + # related config files + - ".woodpecker/web.yml" + # web source code + - "web/**" + # api source code + - "server/api/**" variables: - &node_image 'node:18-alpine' - - &when - - path: &when_path - # related config files - - ".woodpecker/web.yml" - # web source code - - "web/**" - # api source code - - "server/api/**" - branch: - exclude: ${CI_REPO_DEFAULT_BRANCH} - event: push - - path: *when_path - event: [pull_request, tag, deployment] steps: deps: @@ -28,7 +18,6 @@ steps: commands: - corepack enable - pnpm install --frozen-lockfile - when: *when lint: group: test @@ -37,7 +26,6 @@ steps: commands: - corepack enable - pnpm lint - when: *when formatcheck: group: test @@ -46,7 +34,6 @@ steps: commands: - corepack enable - pnpm format:check - when: *when typecheck: group: test @@ -55,7 +42,6 @@ steps: commands: - corepack enable - pnpm typecheck - when: *when test: group: test @@ -64,4 +50,3 @@ steps: commands: - corepack enable - pnpm test - when: *when