Spec Version:
Automate Transformations Management with Rudder CLI and GitHub Actions Beta
- free
- growth
- enterprise
3 minute read
This guide explains how to validate, test, and manage your RudderStack transformations directly via GitHub workflows using the Rudder CLI Project Manager Action.
Key features
By leveraging the Rudder CLI Project Manager Action, you can:
- Validate: Check your transformation YAML configurations for syntax and structure.
- Test: Execute transformation code against test events using the specialized
transformations-testaction. - Apply: Deploy your transformations and libraries to your RudderStack workspace automatically.
Prerequisites
- A GitHub repository containing your Rudder CLI project files (transformations and libraries).
- A workspace-level Service Access Token with the following permissions:
- If you’re on Free or self-hosted plan, or for testing and development only: Generate a Personal Access Token with Read-Write role
Any action authenticated by a Personal Access Token will break if the user generating the token is removed from the organization or there is a breaking change to their permissions.
Token permissions for legacy RBAC system
If you are on the legacy Permissions Management (RBAC) system, your workspace-level Service Access Token should have the Admin role and Grant edit access toggled on under Transformations.
See Generate a workspace-level Service Access Token for steps to create the token.

Setup
Follow these steps to set up the GitHub Actions workflow for your transformations.
Step 1: Configure repository secrets
- In your GitHub repository, go to Settings > Secrets and variables > Actions.
- Add a new repository secret:
- Name:
RUDDERSTACK_ACCESS_TOKEN - Value: The access token generated in the Prerequisites section.
- Name:
RudderStack recommends storing this token in GitHub Secrets and referencing it in your workflow using
${{ secrets.RUDDERSTACK_ACCESS_TOKEN }}.Do not expose the token directly in your workflow files.
Step 2: Create Actions workflow
Create the following workflow in .github/workflows/ within your repository, for example, .github/workflows/transformations.yml:
name: Manage Transformations
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- "project/transformations/**"
jobs:
validate-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate Project Files
uses: rudderlabs/rudder-cli-action@v1.0.1
env:
RUDDERSTACK_ACCESS_TOKEN: ${{ secrets.RUDDERSTACK_ACCESS_TOKEN }}
with:
location: "project/"
mode: "validate"
- name: Test Modified Transformations
uses: rudderlabs/rudder-cli-action/transformations-test@v1.0.1
env:
RUDDERSTACK_ACCESS_TOKEN: ${{ secrets.RUDDERSTACK_ACCESS_TOKEN }}
with:
location: "project/"
scope: "modified"
verbose: "true"
apply:
runs-on: ubuntu-latest
needs: validate-and-test
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Apply Changes
uses: rudderlabs/rudder-cli-action@v1.0.1
env:
RUDDERSTACK_ACCESS_TOKEN: ${{ secrets.RUDDERSTACK_ACCESS_TOKEN }}
with:
location: "project/"
mode: "apply"
Action inputs
Main action (rudderlabs/rudder-cli-action)
Used for validate, dry-run, and apply modes.
| Input | Description | Default |
|---|---|---|
location | Path to the folder containing Rudder CLI project files. | - |
mode | Operation mode: validate, dry-run, or apply. | - |
cli_version | Version of the Rudder CLI tool to use. | v0.13.1 |
Test action (rudderlabs/rudder-cli-action/transformations-test)
Specialized action for running transformation tests.
How it works
- Validation: The
validatemode ensures your YAML files are correctly formatted before any further steps. - Testing: The
transformations-testaction runs your transformation code against the defined test cases. Usingscope: modifiedin PRs is recommended for faster feedback. - Deployment: When changes are merged into the
mainbranch, theapplymode pushes the updates to your RudderStack workspace.
