# Install and run Bun in GitHub Actions (/docs/guides/runtime/cicd)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 233 · updated: 2026-07-28 -->
Related: [Install TypeScript declarations for Bun](/docs/guides/runtime/typescript.md), [Re-map import paths](/docs/guides/runtime/tsconfig-paths.md), [Debugging Bun with the VS Code extension](/docs/guides/runtime/vscode-debugger.md), [Debugging Bun with the web debugger](/docs/guides/runtime/web-debugger.md), [Inspect memory usage using V8 heap snapshots](/docs/guides/runtime/heap-snapshot.md), [Build-time constants with --define](/docs/guides/runtime/build-time-constants.md)

Use the official [`setup-bun`](https://github.com/oven-sh/setup-bun) GitHub Action to install `bun` in your GitHub Actions runner.

```yaml workflow.yml icon="file-code"
name: my-workflow
jobs:
  my-job:
    name: my-job
    runs-on: ubuntu-latest
    steps:
      # ...
      - uses: actions/checkout@v4
      - uses: oven-sh/setup-bun@v2 # [!code ++]

      # run any `bun` or `bunx` command
      - run: bun install # [!code ++]
      - run: bun index.ts # [!code ++]
      - run: bun run build # [!code ++]
```

***

To specify a version of Bun to install:

```yaml workflow.yml icon="file-code"
name: my-workflow
jobs:
  my-job:
    name: my-job
    runs-on: ubuntu-latest
    steps:
      # ...
      - uses: oven-sh/setup-bun@v2
        with: # [!code ++]
          bun-version: 1.3.3 # or "latest", "canary", <sha> # [!code ++]
```

***

See the [`setup-bun` README](https://github.com/oven-sh/setup-bun) for all options.
