ruboty-github_actions
A ruboty plugin to trigger GitHub Actions workflows via chat.
Installation
Add this line to your ruboty project's Gemfile:
gem "ruboty-github_actions"And then execute:
$ bundleUsage
Set a credential
Register a GitHub Personal Access Token for a user:
ruboty github actions set credential <user> <token>
Example:
ruboty github actions set credential alice ghp_xxxxxxxxxxxx
The credential is stored in the ruboty brain.
Fallback credential
If the user has no credential saved by this plugin, the GitHub access token saved by ruboty-qiita-github (stored under the github key in the brain) is used as a fallback. A credential saved via set credential always takes precedence.
Dispatch a workflow
Trigger a workflow run:
ruboty github actions run <repo> <workflow> <branch> [key=value,key2=value2 ...]
Example:
ruboty github actions run tomoasleep/myapp deploy main env=production
The workflow runs as the user who sent the message.
Configuration
| Environment variable | Description |
|---|---|
RUBOTY_GITHUB_ACTIONS_API_URL |
GitHub API base URL (optional, for testing/local emulation) |
Development
Run the test suite:
$ bundle exec rspec