A GitHub Action for running a Chaos Toolkit experiment using the Chaos Toolkit CLI.
You can use the Action as follows:
name: Execute a Chaos Toolkit Experiment
on:
workflow_dispatch:
jobs:
run-chaostoolkit-experiment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: chaostoolkit/run-action@v0
with:
experiment-file: "./experiment.json"
working-dir: "subdir"
install-dependencies: gcp;otel;slackThe Reliably Plan Action has properties which are passed to the underlying script.
These are passed to the action using with.
| Property | Default | Description |
|---|---|---|
| python-version | "3.11" | Run Chaos Toolkit using this version of Python |
| github-token | "${{ github.token }}" | GitHub token with enough permissions to commit to the repository |
| experiment-file | "./experiment.json" | Path to the experiment file relative to the working-dir |
| working-dir | "." | Base directory where to run the experiment from |
| verbose | "false" | Make Chaos Toolkit a bit more verbose |
| install-dependencies | "" | Automatically install Chaos Toolkit dependencies. Semi-column separated list from available groups: gcp, aws, k8s, otel and slack |
| dependencies-file | "" | File of extra dependencies to install more Python packages. For instance requirements.txt |
| upload-results-as-artifacts | "true" | Upload the Chaos Toolkit journal and log files as job artifacts |
| result-artifact-name | "chaostoolkit-results" | Set the name of the uploaded artifact |
- The action automatically installs the Chaos Toolkit and will install
any additional extensions listed in the
install-dependenciesinput - Additional Python dependencies can be provided by creating a
requirements.txtfile into the working directory and setting the file name todependencies-fileinput - If you create a
bindirectory either at the top of your repository or inside the working-directory, the action will automatically add it to thePATH