Test Red-DiscordBot cogs via downloader¶
Exercises cogs installed through Red's downloader by cloning a repo (local or remote), installing the targets, and running RPC smoke tests.
Inputs¶
| Input | Required | Default | Description |
|---|---|---|---|
token |
✅ | — | Token injected into the downloader-driven redbot run so the bot can authenticate with Discord. |
cog_paths |
❌ | — | Comma-separated list of local cog directories to mirror into the temporary downloader repo; leave empty to auto-discover (local) or test every cog in the remote repo. |
repo_name |
❌ | test-repo | Display name passed to the downloader helpers and logs; defaults to 'test-repo'. |
repo_url |
❌ | — | Remote Git repository cloned before invoking downloader; when blank the action builds a throwaway repo from the provided cog_paths. |
repo_branch |
❌ | — | Branch or ref to checkout when repo_url is provided; blank means use the default branch advertised by the remote. |
rpc_port |
❌ | 6133 | TCP port exposed via --rpc-port; defaults to 6133 when not specified. |
Usage¶
Minimal invocation that auto-discovers cog folders (bz-cogs/.github/workflows/check-cogs.yml):
- name: Test cogs via Downloader
uses: nntin/d-flows/actions/test-red-discordbot-downloader@v1
with:
token: ${{ secrets.DISCORD_BOT_TOKEN }}
# Leave cog_paths empty to let the action probe every cog in the repo
Exercise cogs from a remote repository/branch (SeaCogs/.forgejo/workflows/actions.yaml):
- name: Test Cogs
uses: nntin/d-flows/actions/test-red-discordbot-downloader@v1
with:
token: ${{ secrets.DISCORD_BOT_TOKEN }}
repo_url: ${{ forge.server_url }}/${{ forge.repository }}
repo_branch: ${{ forge.event_name != 'pull_request' && forge.event_name != 'pull_request_target' && forge.ref_name || forge.head_ref }}