rrt CI & Automation
rrt action
Scaffold GitHub Actions workflows for repo-release-tools.
Overview
rrt action manages the bootstrapping of GitHub Actions workflows to automate
repository policy checks. It centralizes the creation of standard CI
configurations, ensuring that repo-release-tools is correctly integrated into
the project’s development lifecycle.
The primary subcommand is init, which writes a pre-configured workflow file
that performs branch naming, commit subject, and changelog verification on
every push and pull request.
Responsibilities
- generate starter GitHub Actions workflows using the current
rrtversion - automate the integration of
repo-release-toolsinto the project’s CI - provide safe file operations with dry-run and force-overwrite protections
- emit high-signal, formatted feedback during the scaffolding process
Workflow Content
The generated workflow (.github/workflows/rrt.yml) includes:
- Triggers: Runs on
pushto the main branch and on allpull_requestevents. - Environment: Executes on the latest Ubuntu runner.
- Steps:
- Full history checkout (
fetch-depth: 0) to support git-based checks. - Execution of
Anselmoo/repo-release-toolswith standard policy flags (branch name, commit subject, and changelog checks).
- Full history checkout (
Behavior
- Writes to
.github/workflows/rrt.ymlrelative to the current working directory. - Refuses to overwrite an existing workflow unless
--forceis provided. - Supports
--dry-runto preview the generated YAML in the terminal without writing to disk. - Uses syntax highlighting when displaying the workflow preview in dry-run mode.
Examples
rrt action initrrt action init --dry-runrrt action init --force
Caveats
- Requires a Git repository with a
.github/workflowsdirectory structure (automatically created if missing). - The generated version pin matches the version of
rrtcurrently in use.
Usage: rrt action [OPTIONS] <action_command>
Scaffold a starter GitHub Actions workflow that runs repo-release-tools checks.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Arguments
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
init Write a starter workflow that uses repo-release-tools.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Options
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-h, --help Show this message and exit.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Examples
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
$ rrt action init
$ rrt action init --dry-run
$ rrt action init --force
rrt action init
Usage: rrt action init [OPTIONS]
Write a starter .github/workflows/rrt.yml workflow for repo-release-tools CI.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Arguments
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Options
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
-h, --help Show this message and exit.
--dry-run Preview without writing files.
--force Overwrite an existing workflow file.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Examples
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
$ rrt action init
$ rrt action init --dry-run
$ rrt action init --force