fix: fix woodpecker pipelines
This commit is contained in:
@@ -1,18 +0,0 @@
|
|||||||
when:
|
|
||||||
event: [push]
|
|
||||||
branch: main
|
|
||||||
|
|
||||||
steps:
|
|
||||||
deploy:
|
|
||||||
image: python:3.13
|
|
||||||
commands:
|
|
||||||
- echo "🚀 Deploying to production..."
|
|
||||||
- echo "Branch: main"
|
|
||||||
- echo "Commit: $(git rev-parse --short HEAD)"
|
|
||||||
# Add your deployment commands here
|
|
||||||
# Example:
|
|
||||||
# - uv sync --frozen
|
|
||||||
# - uv run python -m app.main &
|
|
||||||
- echo "✅ Deployment complete"
|
|
||||||
when:
|
|
||||||
status: [success]
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
when:
|
|
||||||
event: [push, pull_request]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
check-branch:
|
|
||||||
image: alpine/git
|
|
||||||
commands:
|
|
||||||
- BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
||||||
- |
|
|
||||||
echo "Branch: $BRANCH"
|
|
||||||
if [ "$BRANCH" = "main" ]; then
|
|
||||||
echo "✓ Production branch (protected)"
|
|
||||||
elif [ "$BRANCH" = "dev" ]; then
|
|
||||||
echo "✓ Development branch (protected)"
|
|
||||||
elif echo "$BRANCH" | grep -qE "^feature/"; then
|
|
||||||
echo "✓ Feature branch"
|
|
||||||
elif echo "$BRANCH" | grep -qE "^(fix|hotfix|release)/"; then
|
|
||||||
echo "✓ Special branch"
|
|
||||||
else
|
|
||||||
echo "⚠️ Unusual branch name: $BRANCH"
|
|
||||||
echo " Recommended: feature/<description>, fix/<description>"
|
|
||||||
fi
|
|
||||||
|
|
||||||
check-commit-message:
|
|
||||||
image: alpine/git
|
|
||||||
commands:
|
|
||||||
- MSG=$(git log -1 --pretty=%s)
|
|
||||||
- |
|
|
||||||
echo "Last commit: $MSG"
|
|
||||||
if echo "$MSG" | grep -qE "^(feat|fix|docs|style|refactor|test|chore): [a-z]"; then
|
|
||||||
echo "✓ Commit message follows convention"
|
|
||||||
else
|
|
||||||
echo "❌ Invalid commit message format"
|
|
||||||
echo " Expected: <type>: <description>"
|
|
||||||
echo " Types: feat, fix, docs, style, refactor, test, chore"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
check-cache-files:
|
|
||||||
image: python:3.13
|
|
||||||
commands:
|
|
||||||
- |
|
|
||||||
CACHE_FILES=$(git diff --name-only HEAD~1 | grep -E "__pycache__|\.pyc$" || true)
|
|
||||||
if [ -n "$CACHE_FILES" ]; then
|
|
||||||
echo "❌ Cache files in commit:"
|
|
||||||
echo "$CACHE_FILES"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- echo "✓ No cache files in commit"
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
when:
|
when:
|
||||||
- event: [push, pull_request]
|
- event: [push, pull_request]
|
||||||
branch: main
|
branch: dev
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: lint
|
- name: lint
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
when:
|
when:
|
||||||
- event: [push, pull_request]
|
- event: [push, pull_request]
|
||||||
branch: main
|
branch: dev
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: tests
|
- name: tests
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
when:
|
when:
|
||||||
- event: [push, pull_request]
|
- event: [push, pull_request]
|
||||||
branch: main
|
branch: dev
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: types
|
- name: types
|
||||||
|
|||||||
Reference in New Issue
Block a user