Files
eleith 84b76b60f3
ci/woodpecker/pr/cli Pipeline was successful
ci/woodpecker/pr/core Pipeline was successful
ci/woodpecker/pr/lsp Pipeline was successful
ci/woodpecker/pr/web-config Pipeline was successful
ci/woodpecker/pr/web-db Pipeline was successful
ci/woodpecker/pr/web-jobs Pipeline was successful
ci/woodpecker/pr/web-lsp Pipeline was successful
ci/woodpecker/pr/web-pieces Pipeline was successful
ci/woodpecker/pr/web-proxy Pipeline was successful
ci/woodpecker/pr/web-theme Pipeline was successful
ci/woodpecker/pr/web-worker Pipeline was successful
ci/woodpecker/pr/web Pipeline was successful
ci/woodpecker/push/cli Pipeline was successful
ci/woodpecker/push/core Pipeline was successful
ci/woodpecker/push/lsp Pipeline was successful
ci/woodpecker/push/web-config Pipeline was successful
ci/woodpecker/push/web-db Pipeline was successful
ci/woodpecker/push/web-jobs Pipeline was successful
ci/woodpecker/push/web-lsp Pipeline was successful
ci/woodpecker/push/web-pieces Pipeline was successful
ci/woodpecker/push/web-proxy Pipeline was successful
ci/woodpecker/push/web-theme Pipeline was successful
ci/woodpecker/push/web-worker Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
[ci] simplify Woodpecker email notifications
2026-11-01 16:24:12 -08:00

130 lines
3.4 KiB
YAML

workspace:
base: /workspace
path: src
when:
- event: push
branch: main
path:
include:
- ".woodpecker/.web-lsp.yml"
- "packages/web/lsp/**"
- event: pull_request
path:
include:
- ".woodpecker/.web-lsp.yml"
- "packages/web/lsp/**"
- event: tag
ref: "refs/tags/@luzzle/web.lsp@*"
steps:
prepare:
image: node:26
environment:
COREPACK_HOME: /workspace/src/.corepack
LUZZLE_NPMRC:
from_secret: luzzle_npmrc
commands:
- printf '%s' "$LUZZLE_NPMRC" | sed 's/[[:space:]]*$//' >> .npmrc
- npm install --global corepack@latest
- corepack enable
- corepack prepare pnpm@11.2.2 --activate
- pnpm config set store-dir .pnpm-store
- pnpm install --frozen-lockfile
test:
image: node:26
environment:
COREPACK_HOME: /workspace/src/.corepack
commands:
- npm install --global corepack@latest
- corepack enable
- pnpm --filter @luzzle/web.lsp lint
- pnpm --filter @luzzle/web.lsp test
check-version:
image: node:26
commands:
- cd packages/web/lsp
- |
VERSION_FROM_PKG=$(node -p "require('./package.json').version")
if [ "$VERSION_FROM_TAG" != "$VERSION_FROM_PKG" ]; then
echo "Version mismatch: Git tag version $VERSION_FROM_TAG does not match package.json version: $VERSION_FROM_PKG"
exit 1
fi
environment:
VERSION_FROM_TAG: "${CI_COMMIT_TAG#@luzzle/web.lsp@}"
when:
- event: tag
extract-semver-tags:
image: alpine/git:latest
commands:
- |
VERSION_FULL="${CI_COMMIT_TAG#@luzzle/web.lsp@}"
VERSION_MAJOR=$(echo "$VERSION_FULL" | cut -d. -f1)
VERSION_MINOR=$(echo "$VERSION_FULL" | cut -d. -f2)
SEMVER_FULL="$VERSION_FULL"
SEMVER_MAJOR_MINOR="$VERSION_MAJOR.$VERSION_MINOR"
SEMVER_MAJOR="$VERSION_MAJOR"
echo "Extracted versions: $SEMVER_FULL, $SEMVER_MAJOR_MINOR, $SEMVER_MAJOR, "
echo -e "$SEMVER_FULL\n$SEMVER_MAJOR\n$SEMVER_MAJOR_MINOR" >> .tags
cat .tags
when:
- event: tag
build-docker-main:
image: woodpeckerci/plugin-docker-buildx:6.0.3
settings:
repo: git.eleith.com/eleith.private/luzzle-web-lsp
username: eleith
dockerfile: packages/web/lsp/Dockerfile
registry: https://git.eleith.com
secrets:
- 'id=npmrc\,src=.npmrc'
context: .
password:
from_secret: gitea_docker_registry
tags:
- latest
when:
- event: push
branch: main
build-docker-tag:
image: woodpeckerci/plugin-docker-buildx:6.0.3
settings:
repo: git.eleith.com/eleith.private/luzzle-web-lsp
username: eleith
dockerfile: packages/web/lsp/Dockerfile
registry: https://git.eleith.com
context: .
secrets:
- 'id=npmrc\,src=.npmrc'
password:
from_secret: gitea_docker_registry
tags_file: .tags
when:
- event: tag
notify:
image: deblan/woodpecker-email:3.3.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
recipients_only: true
when:
- event: push
branch: main
status: [failure, success]