Skip to content

chaostoolkit/run-action

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation


Chaos Toolkit - Chaos Engineering for All Engineers


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;slack

The 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

Various notes

  • The action automatically installs the Chaos Toolkit and will install any additional extensions listed in the install-dependencies input
  • Additional Python dependencies can be provided by creating a requirements.txt file into the working directory and setting the file name to dependencies-file input
  • If you create a bin directory either at the top of your repository or inside the working-directory, the action will automatically add it to the PATH