Fix workflows again (#2129)

Since it does not work this is mainly a revert of #2127
This commit is contained in:
qwerty287 2023-08-07 13:03:23 +02:00 committed by GitHub
parent b485d1bf70
commit 270de5f574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 17 deletions

View file

@ -1,7 +1,7 @@
when:
- event: [pull_request, push]
branch: ${CI_REPO_DEFAULT_BRANCH}
path:
- event: pull_request
- event: push
path: &when_path
- "docs/**"
- ".woodpecker/docs.yml"
# since we generate docs for cli tool we have to watch this too
@ -9,6 +9,7 @@ when:
- "cmd/cli/**"
# api docs
- "server/api/**"
branch: ${CI_REPO_DEFAULT_BRANCH}
- cron: update_docs
event: cron
@ -21,6 +22,9 @@ steps:
image: *golang_image
commands:
- make docs
when:
- path: *when_path
- event: cron
build:
image: *node_image
@ -29,6 +33,9 @@ steps:
- corepack enable
- pnpm install --frozen-lockfile
- pnpm build
when:
- path: *when_path
- event: cron
deploy-preview:
image: woodpeckerci/plugin-surge-preview:next
@ -43,6 +50,7 @@ steps:
failure: ignore
when:
event: pull_request
path: *when_path
# TODO: add step to remove preview again after PR is closed (waiting for #286)
@ -68,4 +76,5 @@ steps:
- git commit -m "Deploy website - based on ${CI_COMMIT_SHA}"
- git push
when:
- event: [push, cron]
event: [push, cron]
path: *when_path

View file

@ -1,5 +1,9 @@
when:
event: [pull_request, tag]
- event: [pull_request, tag]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
variables:
- &golang_image 'golang:1.20.2'
@ -13,10 +17,6 @@ variables:
- "go.*"
# schema changes
- "pipeline/schema/**"
branch:
exclude: ${CI_REPO_DEFAULT_BRANCH}
event: push
- path: *when_path
event: [pull_request, tag, deployment]
steps:

View file

@ -1,15 +1,21 @@
when:
event: [pull_request, tag]
path:
# related config files
- ".woodpecker/web.yml"
# web source code
- "web/**"
# api source code
- "server/api/**"
- event: [pull_request, tag]
- event: push
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- release/*
variables:
- &node_image 'node:18-alpine'
- &when
path:
# related config files
- ".woodpecker/web.yml"
# web source code
- "web/**"
# api source code
- "server/api/**"
event: [pull_request, tag, deployment]
steps:
deps:
@ -18,6 +24,7 @@ steps:
commands:
- corepack enable
- pnpm install --frozen-lockfile
when: *when
lint:
group: test
@ -26,6 +33,7 @@ steps:
commands:
- corepack enable
- pnpm lint
when: *when
formatcheck:
group: test
@ -34,6 +42,7 @@ steps:
commands:
- corepack enable
- pnpm format:check
when: *when
typecheck:
group: test
@ -42,6 +51,7 @@ steps:
commands:
- corepack enable
- pnpm typecheck
when: *when
test:
group: test
@ -50,3 +60,4 @@ steps:
commands:
- corepack enable
- pnpm test
when: *when