I chaperone deploys from Slack to Github.
Once added to a Slack channel - these are the commands I provide:
/deploy {env} {revision}
Sends a notification to GitHub Actions for said repository with a repository dispatch event. I take the env as use it as the type of deployment sent to GitHub Actions.
For example /deploy production 1.2.3 would send this payload to the repository being tracked by the Slack channel in which the command was called:
{
"event_type": "production-deployment",
"client_payload": {
"ref": "1.2.3"
}
}
DeployBot does no validation that production-deployment is a listened-for GitHub Action. In fact, DeployBot does no validation other than:
/deploy-follow {owner/repo} {github-access-token}
Tracks and facilitates deployments for a GitHub repository in a Slack channel. Only one repository is trackable per Slack channel.
A github access token is required.
If DeployBot is already following a repository, it'll report back in the Slack channel as such. Following a new or different repository requires unfollowing the current and following the new target.
With each new, valid follow request, DeployBot ensures it can access the GitHub repository.
/deploy-unfollow {owner/repo}
Todo
/deploy-list {?env}
Todo
/deploy-help
Todo