.env.example 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Server Configuration
  2. HOST=0.0.0.0
  3. PORT=3000
  4. WEBHOOK_PATH=/webhook
  5. WEBHOOK_SECRET=
  6. # Command Execution on Webhook Events
  7. # Available variables for substitution:
  8. # {{repo}} - Repository name (e.g., "my-repo")
  9. # {{full_repo}} - Full repository name (e.g., "user/my-repo")
  10. # {{branch}} - Branch name (e.g., "main", "feature/new-feature")
  11. # {{pusher}} - Username of person who triggered the event
  12. # {{event}} - Event type (e.g., "push", "pull_request")
  13. # {{commit}} - Latest commit hash (for push events)
  14. # {{commit_msg}} - Latest commit message (for push events)
  15. # {{pr_number}} - Pull request number (for PR events)
  16. # {{pr_action}} - Pull request action (opened, closed, etc.)
  17. # {{tag}} - Tag name (for create/delete tag events)
  18. # Push Event Commands
  19. # Execute command when push event is received
  20. WEBHOOK_PUSH_ENABLED=true
  21. WEBHOOK_PUSH_COMMAND=echo "Push to {{branch}} by {{pusher}} in {{repo}}"
  22. # Example: Run deployment script
  23. # WEBHOOK_PUSH_COMMAND=/path/to/deploy.sh {{branch}} {{repo}} {{pusher}}
  24. # Example: Only deploy main branch
  25. # WEBHOOK_PUSH_FILTER_BRANCH=main
  26. # WEBHOOK_PUSH_COMMAND=/path/to/deploy-production.sh
  27. # Pull Request Event Commands
  28. WEBHOOK_PULL_REQUEST_ENABLED=false
  29. WEBHOOK_PULL_REQUEST_COMMAND=echo "PR #{{pr_number}} {{pr_action}} by {{pusher}}"
  30. # Create Event Commands (new branch or tag)
  31. WEBHOOK_CREATE_ENABLED=false
  32. WEBHOOK_CREATE_COMMAND=echo "Created {{ref_type}} {{branch}} in {{repo}}"
  33. # Delete Event Commands
  34. WEBHOOK_DELETE_ENABLED=false
  35. WEBHOOK_DELETE_COMMAND=echo "Deleted {{ref_type}} {{branch}} from {{repo}}"
  36. # Release Event Commands
  37. WEBHOOK_RELEASE_ENABLED=false
  38. WEBHOOK_RELEASE_COMMAND=echo "Release {{tag}} {{pr_action}} in {{repo}}"
  39. # Global Command (runs for ALL events)
  40. WEBHOOK_GLOBAL_ENABLED=false
  41. WEBHOOK_GLOBAL_COMMAND=echo "Webhook {{event}} received for {{repo}}"
  42. # Command Execution Settings
  43. COMMAND_TIMEOUT=300000
  44. COMMAND_WORKING_DIR=/workspace