mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-09 23:28:07 -05:00
### Description 📝 This PR introduces a GitHub Actions workflow that enables cross-repository event dispatching for development environment deployments. The workflow listens for specific PR events and dispatches corresponding deployment/undeployment actions to our cloud infrastructure repository. **How it works:** - The workflow triggers on PR events (opened, synchronized, closed) and PR target events (labeled, unlabeled) - When a PR comment containing `!deploy` is detected from authorized users (PR author, repo owners, members, or collaborators), it dispatches a deployment event - When a PR with existing deployments is closed, it automatically dispatches an undeployment event to clean up resources **Interaction with target repository:** The workflow dispatches events to `Significant-Gravitas/AutoGPT_cloud_infrastructure` with a payload containing: - `action`: Either "deploy" or "undeploy" - `pr_number`: The PR number for tracking - `pr_title`: Human-readable identifier - `pr_state`: Current PR state - `repo`: Source repository name This enables the infrastructure repository to spin up isolated development environments for each PR on demand. ### Changes 🏗️ - Added `.github/workflows/dev-deploy-pr-dispatcher.yml` workflow file - Implements secure cross-repository communication using repository dispatch events - Includes authorization checks to ensure only authorized users can trigger deployments ### Checklist 📋 #### For code changes: - [x] No code changes - this is a workflow addition only #### For configuration changes: - [x] New workflow file added that requires testing - [x] Requires `DISPATCH_TOKEN` secret to be configured with appropriate permissions for cross-repository dispatch - [x] No environment variable changes needed - [ ] Workflow will be tested after initial merge to verify proper event dispatching