Documentation / Getting Started / Your First Workflow

Your First Workflow

Create a GitHub Actions workflow that runs on WorkerRun.

WorkerRun supports two execution modes. Choose the one that fits your use case, or use both in different jobs within the same workflow.

V8 Isolation Mode

Best for lightweight automation — API calls, shell scripts, labeling, and status checks. Add this to .github/workflows/hello.yml:

name: V8 Isolate Example
on:
  pull_request:

jobs:
  hello:
    runs-on: worker-run
    steps:
      - name: Say hello
        uses: actions/github-script@v8
        with:
          script: |
            core.info("Hello from WorkerRun!");
            core.setOutput("result", "success");

      - name: Run shell commands
        run: |
          echo "Current date: $(date)"
          echo "Files:" && ls -la
          curl -s https://api.github.com/zen

Container Mode

Best for builds, tests, and workflows that need git, npm, or a real filesystem. Add this to .github/workflows/build.yml:

name: Container Mode Example
on:
  pull_request:

jobs:
  build:
    runs-on: worker-run/instance-type=lite
    steps:
      - uses: actions/checkout@v4

      - name: Install dependencies
        run: npm install

      - name: Run tests
        run: npm test

      - name: Build
        run: npm run build

How it works

runs-on: worker-run

Routes the job to WorkerRun in V8 Isolation Mode. The job runs in a V8 isolate on Cloudflare Workers with millisecond cold starts. Supports Node.js actions and run: steps with 80+ built-in shell commands (echo, curl, jq, grep, sed, awk, etc.). External binaries like git, node, npm, and docker are not available in this mode.

runs-on: worker-run/instance-type=lite

Routes the job to WorkerRun in Container Mode. The job runs in a real Ubuntu container via Cloudflare Sandbox SDK. Full bash environment, real filesystem, git, npm, and all standard tools are available. actions/checkout@v4 works in this mode. Use instance-type=basic for more resources.

run: (shell commands)

Shell commands work in both modes. In V8 mode, commands run in a built-in shell (@cloudflare/shell) with 80+ commands including echo, curl, jq, grep, sed, awk, sort, cat, ls, find, base64, and date. In container mode, a real bash shell is available with the full system PATH.

actions/github-script@v8

A JavaScript-based action that lets you write inline scripts using the GitHub API. Works in both V8 and container modes. WorkerRun supports Node.js actions with node12, node16, node20, or node24 runtimes.

Both modes support: Node.js actions (node12, node16, node20, node24), if: conditions, continue-on-error, needs: with outputs, expression evaluation (format(), success(), failure(), always()), and pre/post lifecycle hooks.

Container mode additionally supports: actions/checkout@v4, full bash, git, npm, and the complete Ubuntu toolchain.