Skip to content
Open App

GitHub Actions Runner Setup

Actionforge lets you debug GitHub Actions workflow graphs on your machine, eliminating workflow bugs and reducing GitHub runner costs. When actrun detects a GitHub Actions workflow graph (i.e., one created from the GitHub Actions workflow template), it automatically sets up a simulated GitHub Actions environment so you can test your workflows locally before pushing them to GitHub.

When you start a Debug Session for a GitHub Actions workflow graph, the setup dialog includes additional fields specific to GitHub Actions:

  1. Download RunnerDownload the Actionforge runner for your platform.
  2. Set Local Repository Path — Enter the local path to your cloned GitHub repository. This is used as the GITHUB_WORKSPACE.
  3. Set GitHub Token — Create a fine-grained personal access token with minimal permissions. The token is end-to-end encrypted and can only be decrypted by your local runner.
  4. Copy Session Token — Copy the session token and paste it into your local runner to connect.

The dialog configures the environment for you — no manual environment variable setup is needed when using Debug Sessions.


If you prefer to run your GitHub Actions workflow graph directly from the command line, follow these steps:

Download and install the CLI actrun runner for your platform.

Download actrun

For detailed installation instructions, see the Installation Guide.

Many GitHub Actions require a GITHUB_TOKEN to authenticate with GitHub’s API. To run these actions locally, create a fine-grained personal access token :

  1. Click Generate new token
  2. Give it a descriptive name (e.g., “actrun local development”)
  3. Set an expiration date
  4. Select the repositories you want to access
  5. Under Repository permissions, grant the permissions your actions need. Unless you need specific GitHub API features, leave the default permissions which give read access to public resources.
  6. Click Generate token and copy the token

Set the token as an environment variable before running actrun:

Terminal window
export ACT_INPUT_TOKEN="ghp_your_token_here"

Navigate to your repository root and set the following environment variables:

Terminal window
cd /path/to/your/repo
export GITHUB_WORKSPACE="$(pwd)"
export GITHUB_EVENT_NAME="push"
VariableDescription
GITHUB_WORKSPACEPath to your git repository root. actrun uses this to detect the repository name, branch, and commit.
GITHUB_EVENT_NAMEThe event that triggered the workflow (e.g., push, pull_request, workflow_dispatch).
Terminal window
actrun my_workflow.act

When actrun detects a GitHub Actions workflow graph running outside of GitHub Actions, it automatically configures the following environment variables based on your git repository:

VariableValuePurpose
CItrueSignals CI environment
GITHUB_ACTIONStrueSignals GitHub Actions environment
GITHUB_REPOSITORYowner/repoDerived from git remote origin
GITHUB_REFrefs/heads/branchCurrent git branch reference
GITHUB_REF_NAMEbranchCurrent branch name
GITHUB_SHACommit hashCurrent HEAD commit
RUNNER_OSmacOS / Linux / WindowsDetected operating system
RUNNER_ARCHX64 / ARM64Detected CPU architecture
RUNNER_TEMPTemp directoryScratch space for actions
RUNNER_TOOL_CACHE~/.actrun/tool-cacheWhere actions cache tools

The following files for action communication are also created automatically:

VariablePurpose
GITHUB_OUTPUTActions write outputs here
GITHUB_ENVActions set env vars here
GITHUB_PATHActions add PATH entries here
GITHUB_STATEActions save state here
GITHUB_STEP_SUMMARYActions write summaries here

By default, actrun sets the working directory to GITHUB_WORKSPACE for GitHub Actions workflow graphs. You can override this with the ACT_CWD environment variable:

Terminal window
export ACT_CWD="/path/to/custom/workdir"

ACT_CWD takes precedence over GITHUB_WORKSPACE when both are set.


If an action requires additional variables, add these to your environment:

Terminal window
# Workflow metadata
export GITHUB_WORKFLOW="My Workflow"
export GITHUB_JOB="build"
export GITHUB_RUN_ID="1"
export GITHUB_RUN_NUMBER="1"
# GitHub URLs
export GITHUB_SERVER_URL="https://github.com"
export GITHUB_API_URL="https://api.github.com"
export GITHUB_GRAPHQL_URL="https://api.github.com/graphql"
# User info (replace with your details)
export GITHUB_REPOSITORY_OWNER="your-username"
export GITHUB_ACTOR="your-username"