Both pipelines only ever fired on a main push or a release tag, so a branch got no feedback until it merged. Each workflow gains a pull_request trigger carrying its existing path filter, so a PR runs exactly the gates its own package's push does. Nothing ships from a PR. Woodpecker's docker steps were already scoped to a main push or a tag, but GitHub's build-push jobs match on paths and would have run, so they now check the event. The notification steps keyed on status alone and would have mailed on every PR push; they are scoped to push and tag.
100 lines
2.4 KiB
YAML
100 lines
2.4 KiB
YAML
workspace:
|
|
base: /workspace
|
|
path: src
|
|
|
|
when:
|
|
- event: push
|
|
branch: main
|
|
path:
|
|
include:
|
|
- ".woodpecker/calendar.yml"
|
|
- "packages/calendar/**"
|
|
- "packages/config/**"
|
|
- "packages/db/**"
|
|
- "pnpm-lock.yaml"
|
|
- "pnpm-workspace.yaml"
|
|
- event: pull_request
|
|
path:
|
|
include:
|
|
- ".woodpecker/calendar.yml"
|
|
- "packages/calendar/**"
|
|
- "packages/config/**"
|
|
- "packages/db/**"
|
|
- "pnpm-lock.yaml"
|
|
- "pnpm-workspace.yaml"
|
|
|
|
steps:
|
|
prepare:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- corepack prepare pnpm@11.9.0 --activate
|
|
- pnpm config set store-dir .pnpm-store
|
|
- pnpm install --frozen-lockfile
|
|
|
|
build:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- pnpm --filter "@when/calendar..." build
|
|
|
|
lint:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- pnpm --filter @when/calendar lint
|
|
|
|
test:
|
|
image: node:26
|
|
environment:
|
|
COREPACK_HOME: /workspace/src/.corepack
|
|
commands:
|
|
- npm install --global corepack@latest
|
|
- corepack enable
|
|
- pnpm --filter @when/calendar test:coverage
|
|
|
|
notify-success:
|
|
image: deblan/woodpecker-email:3.2.0
|
|
settings:
|
|
dsn:
|
|
from_secret: woodpecker_email_dsn
|
|
from:
|
|
address:
|
|
from_secret: woodpecker_email_from_address
|
|
name:
|
|
from_secret: woodpecker_email_from_name
|
|
recipients:
|
|
from_secret: woodpecker_email_recipient
|
|
level: success
|
|
recipients_only: true
|
|
when:
|
|
- event: [push, tag]
|
|
status: [success]
|
|
|
|
notify-failure:
|
|
image: deblan/woodpecker-email:3.2.0
|
|
settings:
|
|
dsn:
|
|
from_secret: woodpecker_email_dsn
|
|
from:
|
|
address:
|
|
from_secret: woodpecker_email_from_address
|
|
name:
|
|
from_secret: woodpecker_email_from_name
|
|
recipients:
|
|
from_secret: woodpecker_email_recipient
|
|
level: failure
|
|
recipients_only: true
|
|
when:
|
|
- event: [push, tag]
|
|
status: [failure]
|