de0a3c5d84
Validates all commit messages in a PR follow the conventional commits format before allowing build/test to proceed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
# Pull Request Pipeline - Build and test only
|
|
when:
|
|
- event: pull_request
|
|
|
|
labels:
|
|
platform: linux/amd64
|
|
|
|
clone:
|
|
- name: clone
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
lfs: false
|
|
depth: 50
|
|
|
|
steps:
|
|
# Validate commit messages follow conventional commits
|
|
- name: commitlint
|
|
image: node:22-alpine
|
|
commands:
|
|
- npm install -g @commitlint/cli @commitlint/config-conventional
|
|
- |
|
|
echo "module.exports = { extends: ['@commitlint/config-conventional'] };" > commitlint.config.js
|
|
- |
|
|
# Check all commits in the PR
|
|
git log --format=%s origin/main..HEAD | while read -r msg; do
|
|
echo "Checking: $msg"
|
|
echo "$msg" | commitlint || exit 1
|
|
done
|
|
- echo "All commits follow conventional commit format"
|
|
|
|
- name: build-and-test
|
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
|
commands:
|
|
- dotnet restore
|
|
- dotnet build -c Release
|
|
- dotnet test -c Release --logger "console;verbosity=detailed"
|
|
depends_on: [commitlint]
|