Stasis

runner.yaml

Pipeline configuration file reference

runner.yaml

The runner.yaml file defines your CI pipeline. Place it in the root of your repository.

Basic Structure

name: My Pipeline

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Build
        run: make build

Fields

name

The name of your pipeline, shown in the CI UI.

name: Build and Test

on

When the pipeline runs:

on:
  push:
    branches: [main, develop]  # Run on push to these branches
  pull_request:
    branches: [main]           # Run on PRs targeting these branches

jobs

A map of jobs to run. Each job runs in its own container.

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - run: echo "Hello"

  test:
    runs-on: ubuntu-latest
    steps:
      - run: echo "Testing"

jobs.<name>.runs-on

The container image to use:

runs-on: ubuntu-latest        # Ubuntu 22.04
runs-on: node:20              # Node.js 20
runs-on: golang:1.24          # Go 1.24
runs-on: rust:1.94            # Rust 1.94
runs-on: python:3.12          # Python 3.12
runs-on: my-registry/custom   # Custom image

jobs.<name>.steps

A list of steps to run in order:

steps:
  - uses: actions/checkout@v4      # Check out the code

  - name: Install dependencies     # Step with a name
    run: npm ci

  - run: npm test                  # Step without a name

  - name: Build
    run: npm run build
    env:                           # Environment variables
      NODE_ENV: production

jobs.<name>.env

Environment variables for all steps in the job:

jobs:
  build:
    runs-on: ubuntu-latest
    env:
      NODE_ENV: production
      API_URL: https://api.example.com
    steps:
      - run: echo $NODE_ENV

jobs.<name>.working-directory

Set the working directory for all steps:

jobs:
  build:
    runs-on: ubuntu-latest
    working-directory: ./frontend
    steps:
      - run: npm ci
      - run: npm run build

Steps Reference

Basic Step

- run: echo "Hello World"

Named Step

- name: Install dependencies
  run: npm ci

Step with Environment Variables

- name: Run tests
  run: npm test
  env:
    DATABASE_URL: postgres://localhost/test

Step with Working Directory

- name: Build frontend
  run: npm run build
  working-directory: ./frontend

Examples

Node.js Project

name: Node.js CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: node:20
    steps:
      - uses: actions/checkout@v4

      - name: Install dependencies
        run: npm ci

      - name: Run linter
        run: npm run lint

      - name: Run tests
        run: npm test

      - name: Build
        run: npm run build

Go Project

name: Go CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: golang:1.24
    steps:
      - uses: actions/checkout@v4

      - name: Download dependencies
        run: go mod download

      - name: Run tests
        run: go test ./...

      - name: Build
        run: go build ./...

Multi-Language Project

name: Full CI

on:
  push:
    branches: [main]

jobs:
  backend:
    runs-on: golang:1.24
    steps:
      - uses: actions/checkout@v4
      - run: go test ./...

  frontend:
    runs-on: node:20
    steps:
      - uses: actions/checkout@v4
      - run: cd web && npm ci && npm test

Next Steps

On this page