.env.example 1.9 KB

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